Problem when linking with own static libraries
Hello all,
I'm working under Windows XP.
I built static library (say it is called MyStaticLib) I would like to use in my application. The building is ok but when I launch my app, the program stops because it can't find the DLL for MyStaticLib. Is there any options I should set in the .pro files to force the compiler to link statically my lib ?
Thanks,
Re: Problem when linking with own static libraries
Are you using the QtDesigner?
Re: Problem when linking with own static libraries
Add a CONFIG += static in the pro-file.
Qt Designer has nothing to do with this problem, as the Designer simply creates ui-files.
Re: Problem when linking with own static libraries
Quote:
Originally Posted by
Boron
Add a CONFIG += static in the pro-file.
Qt Designer has nothing to do with this problem, as the Designer simply creates ui-files.
I meant Qt Creator, which should allow you to add that line without having to modify the .pro file directly.
Re: Problem when linking with own static libraries
Hi,
Thanks for your replies. I'm already using QT Creator and CONFIG += staticlib has been automatically added in my .pro files when I created the project.
Here is an extract from the .pro of my static library :
Code:
TARGET = MyStaticLibrary
TEMPLATE = lib
CONFIG += staticlib
I use mingw and g++ that are provided with QTCreator under windows platforms.