[Development] Qt 4.8.6 win32-msvc2008 compilation. error LNK2001: unresolved external symbol __imp__q_atomic_increment

Thiago Macieira thiago.macieira at intel.com
Sat Jun 6 00:23:52 CEST 2015


On Wednesday 03 June 2015 08:20:23 Soraya Santana de la Fe wrote:
> I have found the problem and why QT_ARCH_WINDOWS was not defined. I was
> using a diferent folder for my includes, comming from a linux compilation
> instead the one generated by the "make install" command of my new windows
> compilation. After this I see that I cannot share the includes for two
> different architectures, is that correct?

You can, for all files *except* qconfig.h. You need to have separate qconfig.h as 
well as separate mkspecs/qconfig.pri, mkspecs/qmodule.pri, mkspecs/default. You 
usually use a separate qmake, but sharing that is possible provided the above 
restrictions are taken into account.

The easiest way to do all of that is to separate the Qt builds and headers 
entirely.

Note: there's no qmake option to search for the mkspecs/* files I mentioned. 
For qconfig.h, you can easily hack it. Linux distributions do that for Qt 4, by 
replacing qconfig.h with a dispatcher that looks like:

#ifdef __i386__
#  include "qconfig-i386.h"
#elif defined(__x86_64__))
#  include "qconfig-x86_64.h"
#
	...
#endif

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list