Intalling 3rd Party Libraries... HELP

Discussion in 'Mac Programming' started by Soulstorm, Mar 27, 2008.

  1. Soulstorm macrumors 68000


    Feb 1, 2005
    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?
  2. yeroen macrumors 6502a


    Mar 8, 2007
    Cambridge, MA
    what happens when you compile from the command line?
  3. kainjow Moderator emeritus


    Jun 15, 2000
    I can't remember, but is /usr/local one of the paths that GCC uses?
  4. Soulstorm thread starter macrumors 68000


    Feb 1, 2005
    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.

    How do I check that?


    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?
  5. lazydog macrumors 6502a

    Sep 3, 2005
    Cramlington, UK

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

    b e n
  6. kpua macrumors 6502

    Jul 25, 2006
    Yes, you must do this on OSX, because directories in /usr/local/ are not in the PATH by default.
  7. Soulstorm thread starter macrumors 68000


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

Share This Page