PDA

View Full Version : Intalling 3rd Party Libraries... HELP




Soulstorm
Mar 27, 2008, 03:16 AM
I am very frustrated. I am having a very bad problem installing ANY third party library into my Mac. I am using Leopard, but the problem was also apparent in Tiger.

I usually download a 3rd party library and I install it using ./configure and then "sudo make install". Although I see that the files have been installed inside "usr/local/include" (the headers are there!) when I try to make a new project and include those headers, XCode complaints that it can't file this file. However, I see that it is in its position!

This has happened to me with Boost libraries and PCRE library. Same thing, same result. Any suggestions? Do I need to set any environment variables using terminal?



yeroen
Mar 27, 2008, 07:23 AM
what happens when you compile from the command line?

kainjow
Mar 27, 2008, 07:36 AM
I can't remember, but is /usr/local one of the paths that GCC uses?

Soulstorm
Mar 27, 2008, 07:50 AM
what happens when you compile from the command line?

You mean if I install the tools from the command line?

If shows me a lot of messages regarding compilation, and finally, it shows a message indicating that the installation was successful.



I can't remember, but is /usr/local one of the paths that GCC uses?

How do I check that?

EDIT:

the following code #include <iostream>
#include <pcre.h>

using namespace std;

int main(){
cout << "hello!";
return 0;
}

compiles well using the command line, but not using Xcode! What is wrong?

lazydog
Mar 27, 2008, 09:18 AM
Hi

Have you tried adding /usr/local/include to the "User Header Search Paths" in the project info options?

b e n

kpua
Mar 27, 2008, 09:24 AM
Hi

Have you tried adding /usr/local/include to the "User Header Search Paths" in the project info options?

Yes, you must do this on OSX, because directories in /usr/local/ are not in the PATH by default.

Soulstorm
Mar 27, 2008, 01:39 PM
Yes, you must do this on OSX, because directories in /usr/local/ are not in the PATH by default.

That did it. Thanks a lot, guys. I will also try this with the Boost Libraries and see what I will find.