Search code examples
c++iosxcodenamespacesobjective-c++

Unknown type name 'using' in XCode


I have a project (MyLib) inside my main project (MainApp). When I build the MainApp, XCode gives me an error in one of the .h file of MyLib:

using namespace cv;

The error message is:

Unknown type name 'using' 

If I build MyLib alone, I do not have any error.


Solution

  • I expect that header file is included from a .m (Objective-C) file?

    Change the extension to .mm (Objective-C++) and it should work fine.