I downloaded and built a C, g++ library that I want to use in a couple of other C projects.

What is the best/standard directory to put the library in on OS X Snow Leopard?

  • /opt/local/lib/
  • /usr/local/lib/
  • any other?

And related: What is the standard library/include search path for g++?

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

/usr/local/lib is the standard place for these in almost any Unix-like OS.

MacPorts creates the /opt hierarchy so that it doesn't mess with what you've done manually in /usr/local/.

Fink creates the /sw hierarchy for similar reasons.

Homebrew I think still defaults to messing with /usr/local (a design decision I find distasteful), but I think it has a "prefix" option to make it use its own hierarchy instead.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.