#include file not found in iOS in C++ file

后端 未结 2 586
生来不讨喜
生来不讨喜 2021-02-04 11:18

I have a objective c/c++ project under iOS, moving it from OS/X and I get a \'file not found\' error on

#include 

It\'s a clean p

2条回答
  •  猫巷女王i
    2021-02-04 11:46

    If you include a header in an ObjC file and it includes then you hit errors like this. For all .m files XCode uses a C compiler (clang or llvm-gcc). For all .mm files it will use (clang++ or llvm-g++).

    I suggest going through and renaming all your .m files to .mm. Including main.m to main.mm.

提交回复
热议问题