开发者

Linking Static Library to iPhone App

I'm trying to link 2 static libraries with开发者_如何学Python 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?


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.


This question:

Compile, Build or Archive problems with Xcode 4 (and dependancies)

And this answer should help you solve the issue.

In addition:

Xcode 4 can't locate public header files from static library dependancy

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜