qt-interest@trolltech.com
[Top] [All Lists]

Re: [Qt-interest] ATL in Qt...

Subject: Re: [Qt-interest] ATL in Qt...
From: BRM
Date: Mon, 26 Apr 2010 09:06:18 -0700 PDT
----- Original Message ----

> From: "Malyushytsky, Alex" <alex@xxxxxxx>
> To: qt-interest <qt-interest@xxxxxxxxxxxxx>
> Sent: Fri, April 23, 2010 4:40:55 PM
> Subject: Re: [Qt-interest] ATL in Qt...
> 
> 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.

Qt is the Windows version (4.5.2) released by Nokia.
The rest are all compiled under the same compiler - MSVS 2008 SP1+TR1

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

Static library is configured using QMake. Yes I have the source; it is built as 
part of the project.
While it is just standard C/C++ its project file is a QMake project.
All the projects are converted to VC++ using:

qmake -tp vc <qmake project>

One set of projects is converted using:

qmake -tp vc -r <general qmake project>

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

I've tried setting a number of compiler options on the main project/solution 
but to no avail.
Namely: Changing to using static MFC, enabling ATL.

I can try the dynamic MFC/ATL too.

Ben

-----Original 
> Message-----
From: 
> href="mailto:qt-interest-bounces@xxxxxxxxxxxxx";>qt-interest-bounces@xxxxxxxxxxxxx
>  
> [mailto:
> href="mailto:qt-interest-bounces@xxxxxxxxxxxxx";>qt-interest-bounces@xxxxxxxxxxxxx]
>  
> 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

> href="mailto:Qt-interest@xxxxxxxxxxxxx";>Qt-interest@xxxxxxxxxxxxx
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.â

_______________________________________________
Qt-interest 
> mailing list

> href="mailto:Qt-interest@xxxxxxxxxxxxx";>Qt-interest@xxxxxxxxxxxxx

> href="http://lists.trolltech.com/mailman/listinfo/qt-interest"; target=_blank 
> >http://lists.trolltech.com/mailman/listinfo/qt-interest


_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest
<Prev in Thread] Current Thread [Next in Thread>