I downloaded and built the excellent Qwt widget collection on my Mac. When I built the examples I had trouble getting them to find the libqwt dynamic library. They built and linked just fine, but unless I added the path to the qwt install dir to my DYLD_LIBRARY_PATH environment variable launching the application fails with a dyld: Library not loaded: libqwt.5.dylib error.
On Linux the solution would be to add a -Wl -rpath /usr/local/qwt-5.0.2/lib to my LIBS directive in my projects’s .pro file (in this case the relevant line is in the examples/examples.pri config file). This should add the path to qwt’s dylib to my application’s runtime search path. Unfortunately this doesn’t work in Mac OS X. As it turns out, the library itself has to know its full install path.