[Qt-interest] ATL in Qt...

Malyushytsky, Alex alex at wai.com
Fri Apr 23 22:40:55 CEST 2010


With lack of full information I will make few assumptions which according to my impression are required for being able to link to static library:

1. The same Microsoft compiler was used to build: Qt, your project and static library.
If not I am afraid you are out of lack.

2. Static library you mentioned is linked to the same version of CRT libraries.

This mostly likely is false, cause static libraries are normally linked to static (single threaded or multithreaded) CRT libraries and Qt, unless it was changed recently does not support linking to static CRT on the Windows.
You can try manually set the appropriate compiler options and rebuild Qt and your project to link against static CRTs, but at the time I tried it were introducing run-time problem in Qt core.
If you have access to the source code of the static library you mention it would be much easier to rebuild that static library to use CRT you need.
If you don't have access to it,  my impression that it is a lost game and you better find a way not to link to that static library. All you will need to do is to find all static library dependencies.

Regards,
    Alex



-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of BRM
Sent: Friday, April 23, 2010 12:29 PM
To: qt-interest
Subject: [Qt-interest] ATL in Qt...

I have a project that is liking in a _static_ library (not a DLL) on Windows. The library itself is mostly pure C/C++; however, it is ported from an MFC/ATL codebase and uses some ATL classes - namely CPoint and CSize.
When I compile under Linux the appropriate definitions are provided in module that is part of the library; however, compiling under Windows is causing some problems as the definitions interfere with the Windows definitions.

I've tried enabling the project via its settings to use MFC and ATL as
static libraries; but did not have any success.

I really only need to link some stuff in. Is there a trick to doing this with QMake?

TIA,

Ben

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


---------------------------------------------------------------------------------------------------
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.”




More information about the Qt-interest-old mailing list