[C++-sig] Extending Python with not-basic-c++

Stefan Seefeld seefeld at sympatico.ca
Sun Dec 3 14:16:04 CET 2006


David Sveningsson wrote:

> I had another problem which isn't really related to python or boost but 
> I think you might be able to answer it anyway. My python module tries to 
> load my shared library but it can't find it unless it is in a directory 
> like /usr/lib. I don't want to put my libraries there but rather in the 
> same directory as the module and the python code. I think 
> LD_LIBRARY_PATH could be set but I don't want to set that each time (or 
> use a script either). Is there some way to fix this?

You might configure the dynamic loader ('ld.so' ?) to look there by default.
For example, I have an /etc/ld.so.conf config file that I add default
search paths such as /usr/local/lib.

That said, I don't think it's such a great idea to store ordinary DSOs
together in the same directory as python extension modules.

HTH,
		Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list