Use a static C++ library (*.a) in a XCode project ( Objective-C )

Viewed 273

I am creating a static cocoa library in Objective-C++ using XCode. Now I need to link and use in this project, an external C++ static library (libmycpplib.a). So I added to the project the header file (libmycpplib.h) and added "libmycpplib.a" in "Link Binary With Binaries" under "Build Phases" option. I tried to compile but I got an error that i can not solve

"error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lmycpplib.h is not an object file (not allowed in a library)".

Another error I got is:

"Can't locate file for:: -lmycpplib"

What does that mean?

note: I have a very basic experience in Objective-[c|cpp], I am a C++ developer

0 Answers
Related