Results 1 to 6 of 6

Thread: DirectX and Qt with MinGW

  1. #1
    Join Date
    Jul 2007
    Location
    Russia, Ul'yanovsk
    Posts
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default DirectX and Qt with MinGW

    I wrote some code using DirectShow and Qt 4.3.1 Open Source Edition. After compiling using MinGW (WindowsXP SP2) I got a lot of errors. Frequently occuring of them looks like this:

    c:/Program Files/PlatformSDK/Include/winbase.h:1576: error: declaration of C function `LONG InterlockedIncrement(volatile LONG*)' conflicts with d:/Qt/4.3.1/include/QtCore/../../src/corelib/arch/qatomic_windows.h:190: error: previous declaration `long int InterlockedIncrement(long int*)' here

    Is this mean that this version of Qt is not compatible with DirectShow (or COM entirely)? Or any ideas how to fix?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DirectX and Qt with MinGW

    Try changing the order of include statements.

  3. #3
    Join Date
    Jul 2007
    Location
    Russia, Ul'yanovsk
    Posts
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: DirectX and Qt with MinGW

    Quote Originally Posted by wysota View Post
    Try changing the order of include statements.
    I think that is not a solution because even this code compiling with same errors:

    // main.cpp

    #include <dshow.h>

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

    // test.pro

    TEMPLATE = app
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += . "C:\Program Files\PlatformSDK\Include"

    # Input
    SOURCES += main.cpp

    compile command is "qmake && make release"

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DirectX and Qt with MinGW

    This doesn't seem related to Qt then. I don't see any Qt includes here. Are you sure this is the code that gets compiled?

  5. #5
    Join Date
    Jul 2007
    Location
    Russia, Ul'yanovsk
    Posts
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: DirectX and Qt with MinGW

    Quote Originally Posted by wysota View Post
    This doesn't seem related to Qt then. I don't see any Qt includes here. Are you sure this is the code that gets compiled?
    Yes, there are no Qt includes in code, but when I call qmake, it creates a makefile with this line:

    INCPATH = -I"..\..\Qt\4.3.1\include\QtCore" -I"..\..\Qt\4.3.1\include\QtCore" -I"..\..\Qt\4.3.1\include\QtGui" -I"..\..\Qt\4.3.1\include\QtGui" -I"..\..\Qt\4.3.1\include" -I"." -I"c:\Program Files\PlatformSDK\Include" -I"..\..\Qt\4.3.1\include\ActiveQt" -I"release" -I"." -I"..\..\Qt\4.3.1\mkspecs\win32-g++"

    and yet there we can see Qt includes.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DirectX and Qt with MinGW

    But none of them are used (these are just directories where the compiler should look for includes), thus there are no Qt includes... If the compiler complains about Qt includes, you must be compiling some code that actually uses a Qt include.

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.