Intalling 3rd Party Libraries... HELP

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

  1. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    Messages:
    1,885
    #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?
     
  2. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Messages:
    944
    Location:
    Cambridge, MA
    #2
    what happens when you compile from the command line?
     
  3. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    Messages:
    7,743
    #3
    I can't remember, but is /usr/local one of the paths that GCC uses?
     
  4. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    Messages:
    1,885
    #4
    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?

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

    Joined:
    Sep 3, 2005
    Messages:
    686
    Location:
    Cramlington, UK
    #5
    Hi

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

    b e n
     
  6. macrumors 6502

    Joined:
    Jul 25, 2006
    Messages:
    294
    #6
    Yes, you must do this on OSX, because directories in /usr/local/ are not in the PATH by default.
     
  7. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    Messages:
    1,885
    #7
    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