I was tasked with adding C ++ code to an iOS project.
C ++ code comes in the form of several libs (.a) and header files with the extension .hpp
I added these files to the Xcode iOS project and added library paths and header search paths in the project settings, but I get compiler errors.
For example, one of the .hpp files contains:
`#include <string>`
and the error I get is "String: There is no such file or directory"
In the same hpp file there is a namespace declaration:
`namespace FooBar`
and on this line there is an error "expected" = ',', ','; ',' asm 'or' attribute 'before' FooBar '"
I came directly to iOS programming, so my experience was mainly with objective-c. Can anyone offer any recommendations in terms of project settings, search paths, etc., to make C ++ work together with obj-c?
Thanks in advance!
Ian l source
share