Search code examples
iosxcodestatic-librariesobjective-c++ginac

Linking Static Library to iPhone App


I'm trying to link 2 static libraries with my iPhone app. When I compile a separate, identical file with g++ that links against the 2 libraries like this: c++ main.cpp -o main -lcln -lginac it works fine.

In my app I went to build phases -> link binary with libraries and added libginac.a and libcln.a. However, when I compile my app at the line #include ginac/ginac.h I get the error: ginac/ginac.h: No such file or directory.

What am I doing wrong?


Solution

  • Maybe you mix up "header search path" with "links binary libraries". Adding the .a file to your project files does not mean, that also the headers are available.

    You should check the "header search path" within your "build settings" and make sure, the path to "ginac" is set there.