0

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?

jogojapan
  • 68,383
  • 11
  • 101
  • 131
Jack Rogers
  • 305
  • 3
  • 14

2 Answers2

2

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.

Jonas Schnelli
  • 9,965
  • 3
  • 48
  • 60
1

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

Community
  • 1
  • 1
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188