How do I set the static library path in OS X Lion?

Solution 1:

The normal command line is to use the -L option to add the path to the library search

g++ functions.cpp -L/opt/local/lib -lhdf5 -lsiloh5 -lz