Building qt program with static library
Hello all,
I'm trying to build a program under linux with a static library (so that you can run the qt app on another machine, where the qt toolkit isn't installed).
I don't know how qt was installed on the linux box...if the libraries compiled are static or not.....I also don't know if this affects whether or not you can then build a qt app with static libs?
The only thing I can think of is in my .pro file I should add: CONFIG += staticlib ...etc.
Anything else I need to know?
Thanks!
Jonathan
Re: Building qt program with static library
just added template = lib to the .pro file too, but that doesn't help either :(
Re: Building qt program with static library
Quote:
Originally Posted by
JonathanForQT4
I don't know how qt was installed on the linux box...if the libraries compiled are static or not.....I also don't know if this affects whether or not you can then build a qt app with static libs?
You can't build a static application without static libraries.
Quote:
Originally Posted by
JonathanForQT4
The only thing I can think of is in my .pro file I should add: CONFIG += staticlib ...etc.
You have to add CONFIG += static (staticlib is for libraries).
Quote:
Originally Posted by
JonathanForQT4
just added template = lib to the .pro file too, but that doesn't help either :(
TEMPLATE=lib is for libraries, if you want to build an application, use TEMPLATE=app.
Also read this: http://wiki.qtcentre.org/index.php?t...c_applications