Results 1 to 4 of 4

Thread: Is this QT 4.7 compilation problem a bug?

  1. #1
    Join Date
    Sep 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Is this QT 4.7 compilation problem a bug?

    Hi,

    I had a compilation problem described in this thread. As I stated, I narrowed it down to:

    Qt Code:
    1. #include <QGLWidget>
    2. #include <QtNetwork>
    3.  
    4. #include <d3d10.h>
    5.  
    6. int main( int argc, char **argv )
    7. {
    8. return 0;
    9. }
    To copy to clipboard, switch view to plain text mode 

    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

  2. #2
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is this QT 4.7 compilation problem a bug?

    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.

  3. #3
    Join Date
    Sep 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is this QT 4.7 compilation problem a bug?

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

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is this QT 4.7 compilation problem a bug?

    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.

Similar Threads

  1. QtWebKit Compilation problem
    By PiXeL16 in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2008, 00:18
  2. sub-dir compilation problem
    By Salazaar in forum Newbie
    Replies: 13
    Last Post: 2nd November 2007, 21:48
  3. qt4 compilation problem
    By aegis in forum Installation and Deployment
    Replies: 9
    Last Post: 22nd February 2007, 23:10
  4. Problem and solution about QSA 1.2.0 compilation
    By Dwarf007 in forum Installation and Deployment
    Replies: 5
    Last Post: 7th March 2006, 16:52
  5. Compilation problem, don't know why
    By yellowmat in forum Newbie
    Replies: 6
    Last Post: 2nd March 2006, 15:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.