PDA

View Full Version : Is this QT 4.7 compilation problem a bug?



pogo11
15th October 2010, 17:38
Hi,

I had a compilation problem described in this thread (http://www.qtcentre.org/threads/34637-Problem-compiling-Qt-4.7.0-code-with-d3d10.h). As I stated, I narrowed it down to:



#include <QGLWidget>
#include <QtNetwork>

#include <d3d10.h>

int main( int argc, char **argv )
{
return 0;
}


This simple program reproduces the problem with qmake and VS 2005 and doesn't compile. Is this a "bug" somewhere in Qt's (or Direct3D's) header files?

pogo11

Timoteo
15th October 2010, 17:59
Which Windows SDK are you using? The one that came with VS2k5 or later? As a rule of thumb, the latest DirectX SDK requires the latest Windows SDK. This is platform specific programming here, so I don't see how you could implicate Qt in this case.

pogo11
15th October 2010, 18:47
I'm sorry, I didn't mean to imply that it was Qt's fault.

It's just if you comment out any of the three header inclusions, it compiles. So there seems to be a conflict somewhere. And I'm not able to figure it out. I don't understand the compilation errors.

I get the same errors whether it's the d3d10.h from Windows SDK v7.1 or from DirectX SDK (June 2010).

squidge
15th October 2010, 19:22
It seems that Qt is defining something which is also defined in the d3d include files. Since you can define stuff twice, it causes the errors you describe.

You should be able to fix this by recompiling Qt and specifying a namespace for Qt.