[Qt-interest] Static qt build
Malyushytsky, Alex
alex at wai.com
Thu Oct 22 22:23:47 CEST 2009
>>You can make qt link against static visual studio libraries:
>>Go into mkspecs/win32-msvc2008 (or your relevant spec) under the qt directory.
>>Edit the qmake.conf file
>>>From CONFIG, remove the embed_manifest items
>>Where it says '-MD', change it to '-MT' to use the static visual studio libs.
You can make such changes and rebuild QT, but at least with msvc2005 you will get problems running some code.
I tried half year ago and could not resolve the issue with QT commercial support.
Here is part of my report:
It builds successfully and runs in the most cases fine, but at one point QT calls with _CrtIsValidHeapPointer which fails with the following message
"Windows has triggered a breakpoint in ____.exe.
This may be due to a corruption of the heap, and indicates a bug in ______.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information"
I was able to reproduce problems in small example.
Basically I created dialog based application, added combo-box and button to the dialog, filled combo-box in designer with a few strings, Added 1 slot and connected it to the custom slot:
void staticTest::onPushButtonClicked()
{
// to fail Item0 should exist in combobox
QString dataSet = tr("Item0");
int index = ui.comboBox->findText( dataSet ); // fails here if item exists
if( index>-1 )
ui.comboBox->setCurrentIndex( index ); }
Qt support just stated that static build is unsupported.
So you would have either fix problems in QT yourself or don't build it statically.
Best regards,
Alex
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Eirik Ulvik
Sent: Thursday, October 22, 2009 3:29 AM
To: Qt-interest
Subject: Re: [Qt-interest] Static qt build
Eirik Ulvik skrev:
J-P Nurmi skrev:
On Thu, Oct 22, 2009 at 2:10 AM, Malyushytsky, Alex <alex at wai.com><mailto:alex at wai.com> wrote:
AFAIK you can't get "totally standalone (no dll's required) application" at least on Windows.
"Static" version of QT is not self-sufficient since it is built vs dynamic CRT libraries (at least with MSVC).
All you get is static QT library which still uses CRT dlls.
My guess is that Qt itself does not probably build static postgre sql static libraries and this why you probably still need that DLLs.
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com<mailto:qt-interest-bounces at trolltech.com> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Eirik Ulvik
Sent: Tuesday, October 20, 2009 11:57 PM
To: Qt-interest
Subject: [Qt-interest] Static qt build
I have built a static version of Qt (4.5.3) which include PostgreSql.
Everything configures/compiles just fine. The application works like a
charm except that at runtime it requests all the dll's from postgre sql.
Are these not compiled into Qt? Do I need static versions of these as
well to get a totally standalone (no dll's required) application.
Regards,
Eirik
Why does a statically built Qt use the dynamic Visual Studio runtime
libraries ? Do I need to deploy those with my application ?
http://qt.nokia.com/developer/faqs/why-does-a-statically-built-qt-use-the-dynamic-visual-studio-runtime-libraries-do-i-need-to-deploy-those-with-my-application
--
J-P Nurmi
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest
You can make qt link against static visual studio libraries:
Go into mkspecs/win32-msvc2008 (or your relevant spec) under the qt directory.
Edit the qmake.conf file
>From CONFIG, remove the embed_manifest items
Where it says '-MD', change it to '-MT' to use the static visual studio libs.
Regards,
Eirik
________________________________
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest
Forgot to mention that after doing this you should configure qt using the -static option -platform win32-msvc2008 options.
Regards,
Eirik
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091022/bc1afd9b/attachment.html
More information about the Qt-interest-old
mailing list