library-path

How to get the system library path on Unix (Linux, FreeBSD)

I need a more-or-less portable programmatic way for querying the the dynamic library path list. For Linux, I can concatenate the $LD_LIBRARY_PATH and the contents of /etc/ld.so.conf (processing the include directives as needed and possibly filtering by architecture), but that doesn't work e.g. on FreeBSD. Ultimately, I need a Python fun...

GNU ld cannot find library which is there

The packages I'm toying with here are rather unknown, but nevertheless the problem is rather generic. Basically, I'm trying to compile Python module (called rql) with C++ extension. The extension uses external framework called gecode, which contains several libraries. I compiled gecode and installed locally. Now, let the output speak for...