Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
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?
 

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
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.



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

How do I check that?

EDIT:

the following code
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?
 

kpua

macrumors 6502
Jul 25, 2006
294
0
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

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.