Results 1 to 18 of 18

Thread: How to configure Qt to work with MinGW-64?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: How to configure Qt to work with MinGW-64?

    are u using qt sdk or qt library source?
    sdk wont work.. use source

  2. #2
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    Quote Originally Posted by MrDeath View Post
    are u using qt sdk or qt library source?
    sdk wont work.. use source
    I'm using SDK v2009.03. I'm on Windows - Vista 64. I'm afraid I'm not even sure where to get source Didn't see a link on the download page.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

  4. #4
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    Thanks. I'd actually prefer to use the SDK, though I'd be willing to try just the source. However I actually see that qtenv.bat, "win32-g++" is already the QMAKESPEC. What I'd like is to change it to mingw-w64 (mingw-w64\bin\mingw32-make.exe is the make command on my computer, mingw-w64\bin\x86_64-w64-mingw32-g++.exe and C:\mingw-w64\bin\x86_64-w64-mingw32-gcc.exe are the compilers).

    I tried editing qtenv.bat to "set QMAKESPEC=x86_64-w64-mingw32" and "set QMAKESPEC=c:\mingw-w64\bin\x86_64-w64-mingw32" but the programs being compiled were still using the 32 bit compiler.

    "configure -platform c:\mingw-w64\bin\x86_64-w64-mingw32-g++" and "configure -platform x86_64-w64-mingw32-g++" both give me "Invalid option "c:\mingw-w64\bin\x86_64-w64-mingw32-g++" for -platform." type errors.

    Should I uninstall the SDK and try to run configure again with the source, and/or is there something else I should be using other than x86_64-w64-mingw32?

  5. #5
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    Alternatively, is there a temporary modification I can make to the Makefile to have it build with MinGW-64? I need to be getting some work done

  6. #6
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: How to configure Qt to work with MinGW-64?

    try everything you mentioned with source only... the sdk comes precompiled and QtCreator etc are dependent on it.. if you configure it again .. they will break... we have seen a lot of ppl having problems with sdk when they try to change it (for example use it with msvc).
    Theotrically SDKs are standalone products and they should not be changed.

    so first try win32-g++ with Qt source and make sure that no mingw(32bit) compiler is present on your machine.

  7. #7
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    I uninstalled the SDK and installed 4.5.2. During installation I pointed it to the location of MinGW 64 though it said it couldn't locate g++, I guess because it was looking for the 32 bit filename. Renaming the file might be an option there anyway.

    I ran 'configure -platform win32-g++' but I'm getting the same error as with the SDK.

    "make (e=2): The system cannot find the file specified.
    mingw32-make: *** [project.o] Error 2
    Building qmake failed, return code 2"

    Also when I try to launch Assistant, Demos, etc. I get the error "mingwm10.dll was not found". I searched in the mingw-w64 folder and there's no such DLL, the only DLLs are libgcc_s_sjlj-1.dll, lissp-0.dll, and libssp.dll.a.

  8. #8
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: How to configure Qt to work with MinGW-64?

    Quote Originally Posted by Skywalker View Post
    I uninstalled the SDK and installed 4.5.2. During installation I pointed it to the location of MinGW 64
    are you sure you are using the sources? did you downloaded the 4.5.2 exe file? if yes then download the source here

    http://get.qtsoftware.com/qt/source/...-src-4.5.2.zip

  9. The following user says thank you to nish for this useful post:

    Skywalker (9th July 2009)

  10. #9
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    Whoops you're - I read the wrong post in the thread you directed me to - saw the one about "right column", missed your post with the link.

    I actually got the same error as before however. This time it occurred to me to copy 'x86_64-w64-mingw32-g++.exe' to 'g++.exe', and surprisingly that actually seems to have worked in bypassing that particular error. Must have been the problem since the start.

    After I uninstalled 4.5.2, I unzipped and ran 'configure -platform win32-g++'. It ran for a while but fails with the error message:
    C:\Qt/src/corelib/tools/qdatetime.cpp: In function 'void localToUtc(QDate&, QTim
    e&, int)':
    C:\Qt/src/corelib/tools/qdatetime.cpp:3768:12: error: '_tzset' was not declared
    in this scope
    C:\Qt/src/corelib/tools/qdatetime.cpp: In member function 'QString QDateTimePars
    er::sectionText(const QString&, int, int) const':
    C:\Qt/src/corelib/tools/qdatetime.cpp:4424:10: warning: case label value is less
    than minimum value for type
    C:\Qt/src/corelib/tools/qdatetime.cpp:4425:10: warning: case label value is less
    than minimum value for type
    C:\Qt/src/corelib/tools/qdatetime.cpp:4426:10: warning: case label value is less
    than minimum value for type
    C:\Qt/src/corelib/tools/qdatetime.cpp: In member function 'QString QDateTimePars
    er::sectionText(int) const':
    C:\Qt/src/corelib/tools/qdatetime.cpp:4438:10: warning: case label value is less
    than minimum value for type
    C:\Qt/src/corelib/tools/qdatetime.cpp:4439:10: warning: case label value is less
    than minimum value for type
    C:\Qt/src/corelib/tools/qdatetime.cpp:4440:10: warning: case label value is less
    than minimum value for type
    mingw32-make: *** [qdatetime.o] Error 1
    Building qmake failed, return code 2

  11. #10
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: How to configure Qt to work with MinGW-64?

    looks like only Mr. Wysota or Google can help you now.. I dont have 64machine.. cant test myselft sorry

  12. #11
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    OK - thanks for your help

  13. #12
    Join Date
    Jan 2009
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to configure Qt to work with MinGW-64?

    I commented out the _tzset() line in qdatetime.cpp to see if that would help, but now I'm getting many new errors, now from qfsfileengine_win.cpp. They seem to be the same as for the person on this post to the mailing list.
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:112:123: warning: 'dllimport' attr
    ibute ignored
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:114:162: warning: 'dllimport' attr
    ibute ignored
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:122:56: warning: 'dllimport' attri
    bute ignored
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In static member function 'static
    void QFSFileEnginePrivate::resolveLibs()':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:177:99: warning: deprecated conver
    sion from string constant to 'WCHAR*'
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:181:98: warning: deprecated conver
    sion from string constant to 'WCHAR*'
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:184:101: warning: deprecated conve
    rsion from string constant to 'WCHAR*'
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'qint64 QFSFil
    eEnginePrivate::nativeSize() const':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:666:50: error: '_get_osfhandle' wa
    s not declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'int QFSFileEn
    ginePrivate::nativeHandle() const':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:903:33: error: '_fileno' was not d
    eclared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:913:60: error: '_open_osfhandle' w
    as not declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'bool QFSFileE
    nginePrivate::nativeIsSequential() const':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:934:57: error: '_fileno' was not d
    eclared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:934:58: error: '_get_osfhandle' wa
    s not declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'bool QFSFileE
    nginePrivate::doStat() const':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:1323:50: error: '_get_osfhandle' w
    as not declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'virtual bool
    QFSFileEngine::setPermissions(uint)':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:1918:4: error: '::_chmod' has not
    been declared
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'virtual bool
    QFSFileEngine::setSize(qint64)':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:1938:46: error: '_get_osfhandle' w
    as not declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'virtual QDate
    Time QFSFileEngine::fileTime(QAbstractFileEngine::FileT ime) const':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:2004:49: error: '_get_osfhandle' w
    as not declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp: In member function 'uchar* QFSFil
    eEnginePrivate::map(qint64, qint64, QFile::MemoryMapFlags)':
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:2056:53: error: '_fileno' was not
    declared in this scope
    C:\Qt\qt/src/corelib/io/qfsfileengine_win.cpp:2056:54: error: '_get_osfhandle' w
    as not declared in this scope
    mingw32-make: *** [qfsfileengine_win.o] Error 1
    Building qmake failed, return code 2

Similar Threads

  1. A Guide to Install MinGW, Qt4 and Eclipse Integration on Windows XP
    By shiyutang in forum Installation and Deployment
    Replies: 10
    Last Post: 5th August 2009, 05:03
  2. Shadow build QT for the win32-g++ (MinGw) platform.
    By Avrohom in forum Installation and Deployment
    Replies: 0
    Last Post: 21st January 2009, 00:10
  3. Qt 4.4.0 + MinGW + MySQL installation problem
    By jambrek in forum Installation and Deployment
    Replies: 2
    Last Post: 1st December 2008, 12:02
  4. anyone building/deploying Qt+Coin3d+SoQt apps with MinGW??
    By vonCZ in forum Installation and Deployment
    Replies: 0
    Last Post: 13th November 2008, 16:59
  5. Qt + boost + MinGW on Windows
    By akos.maroy in forum Newbie
    Replies: 3
    Last Post: 12th June 2008, 15:53

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
  •  
Qt is a trademark of The Qt Company.