views:

48

answers:

1

I'm venturing into the world of C++ and Linux, and am having problems linking against a shared library.

I have a library, libicuuc.so.44.1, installed in /usr/local/lib. There is also a link in the same directory, libicuuc.so.44 pointing to that library.

My /etc/ld.so.conf reads:

include /etc/ld.so.conf.d/*.conf

I have a file, /etc/ld.so.conf.d/libc.conf, that contains:

# libc default configuration
/usr/local/lib

However, when I compile my program (that includes LIBS += -licuuc), I get the following error at runtime:

error while loading shared libraries: libicuuc.so.44: cannot open shared object file: No such file or directory

I am using Qt Creator on Ubuntu 10.04.

Any help is greatly appreciated!

+1  A: 

Did you modify by yourself /etc/ld.so.conf.d/libc.conf ?

If yes, then run (as root) ldconfig to re-read the config.

Tristram Gräbener
Thanks--that was it. I hadn't hand-modified it; `make install` must have done it, and I didn't know about the `ldconfig` command. Appreciate the help!
Dave