1

I am running a Swift project where I have to use a Framework made in ObjC. When I want to include this framework and use it in my code. When I import the header in my bridge, I have the following error:

#include <iostream>    'iostream' file not found

In order to fix this problem I added this path "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/" in the "System Header Search Paths" under Build Settings. II now have this error:

namespace std     Expected ';' after top level declarator
{
    typedef decltype(nullptr) nullptr_t;
}

This error happens in the file __nullptr in c++. Anyone knows how to fix it ?

Thanks everyone for your help!

mistralaix
  • 29
  • 1
  • 4
  • 3
    You *cannot* import C++ code to Swift, see for example https://stackoverflow.com/q/35229149/1187415 – Martin R Apr 26 '21 at 12:28

0 Answers0