I am converting an App Delegate file from .m to .mm (Objective-C to Objective-C ++) in order to access a third-party library written in Objective-C ++. In Objective-C, my application delegate builds and works fine. But when I change the extension, the project builds, and I get link errors, all of which skip characters from the static library written in C that I use. Errors are classic link errors in the following format:
"MyFunction (arguments)" referenced:
- [MyAppDelegate myMethod] at MyAppDelegate.o
Symbol not found
All problems are present in the application delegation object. I know that I am configured to compile Objective-C ++ because my ViewController file is .mm. Therefore, my question consists of several parts.
Firstly, do these symbols really not exist in the sense that I cannot use them? In other words, is it impossible to access the plain old C functions from an Objective-C ++ file? If true, this is pretty unfortunate. I thought that almost all Objective-C code, and, of course, Objective-C code, which at least builds as .mm, was valid Objective-C ++. I am wrong?
If not, any idea how I can prevent these errors? Are there header rules that are different from Objective-C ++ that I don't know about?
Thanks for any help.
source share