views:

59

answers:

2

I'm looking at using the tre tool provided at http://laurikari.net/tre/. I'm trying to install it on my Mac OS X box via the terminal. I've followed what I believe to be the regular path to install a new library - ./configure, sudo make, sudo install. Everything seems to go swimmingly.

When I then go to access the library in c, I receive the following (gcc) compiler error: error: tre/tre.h: No such file or directory

Where are c libraries installed on the machine specifically? How can I verify if a package/library has been installed correctly?

A: 

New libraries are typically installed under /usr/local/include, but it's going to depend on how you built and installed the library. Once you find the header files, try adding -I/path/to/headers in your compile command.

You may also want to shy away from using sudo with the initial make command, and use it only for the make install. Sometimes running the initial make command with root privs causes problems.

echo
+1  A: 

I made a blog post about this very subject if you are interested.

Using open source libraries on Mac OS X.

Simon