Hi,
I've the following .pro file to compile a library called "mylib" :
TEMPLATE = lib
VERSION = 0.1
TARGET = mylib
...
TEMPLATE = lib
VERSION = 0.1
TARGET = mylib
...
To copy to clipboard, switch view to plain text mode
When compiling under windows with QtCreator (mingw), it generates a file named "mylib0.dll" (and a "mylib0.a"). Now, if I compile under linux with g++, I got "mylib.so -> mylib.so.0 -> mylib.so.0.1-> mylib.so.0.1.0".
When I tried to use the library from another .pro files, I do:
TEMPLATE = app
TARGET = test
LIBS += -L ../mylib -lmylib
INCLUDEPATH += ../mylib/include
...
TEMPLATE = app
TARGET = test
LIBS += -L ../mylib -lmylib
INCLUDEPATH += ../mylib/include
...
To copy to clipboard, switch view to plain text mode
It works under linux, as the linker search for a "mylib.so" file, but It is not working under windows. If I change "-lmylib" with "-lmylib0", it works under windows but not under linux (as the file is called "mylib.so.0".
How can I handle this ? I'm trying to find a solution which avoid specifying as much as possible scopes. This is because I want to support a lot of platform and do not want, in each of my pro files, making win32 {..}, unix {...}, mingw {...} etc just for the linking purpose.
Regards,
Bookmarks