View Full Version : How to build a library from application
kamlmish
8th February 2011, 05:40
Hi
I have a application and a library . Currently I am able to build the library and application separatly and link the application to it
My case is that , when i import the application pro file, the qmake should be able to build the library and then run the application .
wagmare
8th February 2011, 06:08
just u reconfigure ur .pro file
TEMPLATE = lib
CONFIG += staticlib (or) CONFIG += dll
it will automatically generate a library ...
tbscope
8th February 2011, 06:39
just u reconfigure ur .pro file
TEMPLATE = lib
CONFIG += staticlib (or) CONFIG += dll
it will automatically generate a library ...
What about the main function?
What about the event loop?
kamlmish
8th February 2011, 06:44
Attached is the pro file for the application (scrapbook ) and the library( gallery)
I need to reconfigure the pro file for scrapbook so that , qmake builds gallery and then scrapboook automatially
wagmare
8th February 2011, 07:15
What about the main function?
What about the event loop?
no need for main and QApplication event loop .. the application where u want to include this widget having event loop is enough ....
kamlmish
8th February 2011, 09:02
I included
SUBDIRS + = /path to GALL.pro
in the scrapbook.pro , but I get error
make: *** No rule to make target `../libs/libGALLERY.so
tbscope
8th February 2011, 09:05
no need for main and QApplication event loop .. the application where u want to include this widget having event loop is enough ....
Which means you can't turn an application into a library by just changing the .pro file?
Or do I miss something here?
Edit: I might also misinterpret the original question. Does the original question ask for an application to be turned into a library or not?
kamlmish
8th February 2011, 10:32
My question was that when the QMAKE builds the scrapbook.pro , it should internally go to Gall.pro and create the libraries
currently , I have to explicitly build the Gall libraries
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.