Hi,

I've the following .pro file to compile a library called "mylib" :

Qt Code:
  1. TEMPLATE = lib
  2. VERSION = 0.1
  3. TARGET = mylib
  4. ...
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:
Qt Code:
  1. TEMPLATE = app
  2. TARGET = test
  3. LIBS += -L ../mylib -lmylib
  4. INCLUDEPATH += ../mylib/include
  5. ...
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,