[Development] QtLocation precompiled header problem

Thiago Macieira thiago.macieira at intel.com
Tue May 27 23:33:30 CEST 2014

Em ter 27 maio 2014, às 14:21:40, Thiago Macieira escreveu:
> As it turns out, I didn't test it in all modules with Visual Studio. I've
> just  fixed one problem in QtScript and we have one left in qtlocation for
> QtLocation which makes no sense to me and I can't reproduce.

I have a workaround for the problem, but I'd like someone to see if they can 
reproduce it.

When you compile QtLocation with Visual Studio, you get:

  maps\qgeocameratiles.cpp(78) : error C2365: 'Polygon' : redefinition; 
previous definition was 'function'
          C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\wingdi.h(4548) 
: see declaration of 'Polygon'

The problem is: I can't find what did #include <windows.h>. The precompilation 
header for QtLocation is

#include <QtCore/QtCore>
#include <QtPositioning/QtPositioning>

since there's no windows.h reference anywhere in qtlocation.git, it must be 
coming from one of the QtCore headers. But that also fails a simple check:

$ git grep -l windows\\.h origin/dev -- \*.h | grep -v _p.h

Neither qt_windows.h nor qfunctions_wince.h are part of <QtCore>. And 
qfunctions_wince.h #ifdef's out everything unless it's Windows CE, yet the 
problem happened on regular Windows:


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

More information about the Development mailing list