Unknown type name 'using' in Xcode

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

using namespace cv; 

Error message:

 Unknown type name 'using' 

If I create only MyLib, I have no errors.

+4
source share
1 answer

I expect the header file to be included from a .m file (Objective-C)?

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

+11
source

Source: https://habr.com/ru/post/1488700/


All Articles