
Originally Posted by
fullmetalcoder
Firts of all I believed that any shared lib neede an import lib (.a in my case) but none was created...
Only crappy OSes need it.
Second step : running the app. My executable is in the same directory as my .so, the makefile created 3 symlinks to it to make sure it can't get lost...
And the executable doesn't find the library!!!
I tried changing the name of the real shared library to avoid troubles with symlinks but it didn't change anyhting!
Linux doesn't look for libraries in the "current directory". You have to tell it where to look for the lib. For example by issuing:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
To copy to clipboard, switch view to plain text mode
or simply:
LD_LIBRARY_PATH=. ./devqt
LD_LIBRARY_PATH=. ./devqt
To copy to clipboard, switch view to plain text mode
Bookmarks