PDA

View Full Version : Releasing a program



Dante
13th April 2009, 19:41
Hi
I make my programs by writing .h and .cpp and main and .ui files and running qmake -project , qmake *.pro and make on them.but this process gives me an executable in debug folder that needs three .dll files(if i remove qt paths from path variable).I have two questions.
1-Does the release version needs those .dll files?
2-How can i make a release version of my software?
thanks

user_mail07
13th April 2009, 22:47
You can add in your .pro file if is release version or debug version by using some variable.The values stored in the CONFIG variable are treated specially by qmake. Each of the possible values can be used as the condition for a scope.



if it is release version
{
CONFIG += release
CONFIG -= debug
}



win32 {
debug {
CONFIG += release //We are in debug mode. Qt was built in debug mode.
}
}
}

//Outside of debug mode means you are already in release mode
{
CONFIG += debug
}

^NyAw^
14th April 2009, 10:07
Hi,

Posting this one more time will produce an automatic release. :eek:

jpn
14th April 2009, 15:23
I tend to use "qmake -config release" or "qmake -config debug" instead of hard coding anything to .pro files.

Dante
14th April 2009, 19:17
I made a release version of my program but it still needed those .dlls(when i removed the needed paths)
So what is the difference between release and debug mode?
and could you explain about unix and max os x modes in qmake?
thanks again

jpn
19th April 2009, 11:01
Of course you still need libraries. The release version just links to release libraries, whereas the debug version links to debug libraries. With static linking you can embed the libraries into the executable, though.

Dante
19th April 2009, 16:10
How can i do static linking?

Lykurg
19th April 2009, 16:25
Come on, use google or look at the docs:
Deploying Qt Applications (http://doc.trolltech.com/4.5/deployment.html)
or
Building static applications (http://wiki.qtcentre.org/index.php?title=Building_static_applications)