Hi,
I have a question about shared libraries in Linux.
When create my application in Windows, I can add the libraries I want to use simply in the .pro file:
win32:release {
LIBS += release/frist.dll \
release/second.dll
}
win32:debug {
LIBS += debug/frist.dll \
debug/second.dll
}
win32:release {
LIBS += release/frist.dll \
release/second.dll
}
win32:debug {
LIBS += debug/frist.dll \
debug/second.dll
}
To copy to clipboard, switch view to plain text mode
The same code doesn't work in Linux:
unix {
LIBS += release/libfrist.so.1.0.0 \
release/libsecond.so.1.0.0
}
unix {
LIBS += release/libfrist.so.1.0.0 \
release/libsecond.so.1.0.0
}
To copy to clipboard, switch view to plain text mode
I'm able to compile the executable, but when I try to execute it, just nothing happens.
I used ldd (terminal command) to list all libraries which are used by my executable. It lists my *.so-file, but it says "not found". The Qt libraries are also listed, but that can be found. Why isn't Linux able to find my libraries? I put them in the same directory as the executable. I also tried to put them to /usr/lib and to put them to /lib but that didn't work, too. Do I need to register the libraries first or did I do something wrong when I compiled the executable?
Bookmarks