How can I use MingW to build 64 bit Qt Lib on a 32 bit system?



  • The topic ""How can I build 64 bit Qt on a 32 bit system ?"":http://developer.qt.nokia.com/faq/answer/how_can_i_build_64_bit_qt_on_a_32_bit_system says nmake build arch lib.

    I want to use MingW to build 64bit QT Lib on 32 bit platform. What's steps?



  • You can’t, atleast what I know of. I think not even gcc supports that still; Linux kernel has somewhat of support running 64 bit programs in 32bit space but I suppose that isn’t in mainline and/or doesn’t work well.



  • Why should it not be possible? It's just another case of cross compiling. Notice, it's all about building, not running the libs :-)

    If you use MinGW the make command is "mingw32-make". But you need a MinGW compiler that can create 64 bit code. Probably you must install a special version of gcc, because it could be that the regular 32bit compiler does not support this cross compiling out of the box.



  • By default you don’t crosscompile using gcc(mingw). Of course it is different if you are crosscompiling, but you need to create full environment for that.

    There is actually project called mingw64, do that support this? I doubt though.



  • Thanks all!



  • [quote author="Volker" date="1299070034"]Why should it not be possible? It's just another case of cross compiling. Notice, it's all about building, not running the libs :-)

    If you use MinGW the make command is "mingw32-make". But you need a MinGW compiler that can create 64 bit code. Probably you must install a special version of gcc, because it could be that the regular 32bit compiler does not support this cross compiling out of the box.[/quote]

    Thanks!
    I agreed Volker’s point of view: “Only build, not run.” I download MinGW-w64 cross toolchain, I not see the 32bit and 64bit command prompt, only “MinGW command prompt”. Not like VS have: 32bit: “visual studio 2008 command prompt” 64bit:“visual studio 2008 ×64 command prompt”.

    And unfortunately, I follow the steps of how_can_i_build_64_bit_qt_on_a_32_bit_system [developer.qt.nokia.com] , but not success. My steps:
    Qt

    1. Download :qt-everywhere-opensource-src-4.7.1.zip, release to D;/QT/4.7.1
    2. Setup VS2008 (include x64 toolchain)
      3: Go to “visual studio 2008 ×64 command prompt”, step into QT dir
      4: Use “configure -opensource …..-platform win32-msvc2008|”
    3. the 4 step is success, but when use “nmake”, pop the error messagebox: qmake is not a valid win32 app.
      I know at 4 step, build 64 bit QT tools, these tools cannot running on 32bit platform.
      But how to build 32bit qt tools( moc.exe , uic.exe qmake.exe, rcc.exe etc.)?

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.