Can I call an Objective-C class from a C++ program? -


i have open source c++ project. aim extend project additional code. code objective-c code (because don't know c++). have found way call objective-c function c++ class (calling objective-c method c++ method?) but, when try compile c++ code xcode, xcode freezes (no error during building phase). question if possible call objective-c class out of project written in c++.

has had experiences that?

xcode freezing definitly bug, should compile or give error. try switching compiler in project settings.

as long c++ code compiled in objective-c++ mode should work. afaik compile in objective-c++ mode if file extension .mm or if explicitly tell compiler. commandline switch both gcc , clang -objc++


Comments