Results 1 to 10 of 10

Thread: Build Qt4.3.2 from sources with MinGW under WinXP

  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Build Qt4.3.2 from sources with MinGW under WinXP

    Hello,

    I downloaded "MinGW-3.1.0-1.exe" and installed it under "D:\Applications\MinGW".

    I downloaded the "qt-win-opensource-src-4.3.2.zip" archive from Trolltech website.
    It contains the source code of Qt4.3.2 Open Source for Windows 32-bit platform. I've uncompressed it in "D:\Applications\Qt\4.2.3".

    I've edited my environments variables, and here is my Path variable :
    "D:\Applications\MinGW;D:\Applications\MinGW\bin;D :\Applications\MinGW\lib;D:\Applications\Qt\4.3.2\ bin;D:\Applications\Qt\4.3.2\lib;D:\Applications\Q t\4.3.2\;%SystemRoot%\system32;%SystemRoot%;%Syste mRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static"

    So, I would like to build my Qt Sources and I don't know how should I do.

    I've made a copy of "cmd.exe" and paste it in my Qt dir. Next I've set my configuration ("configure -static -release -qt-gif -qt-libpng -qt-libjpeg -no-vcproj -no-dsp"). At this step, there is no error. After the configuration, I've ran "mingw32-make" but it returned me many errors, like if MinGW didn't knew Qt types (QInt64, for example).

    I suppose I should do something, like does the "qtvars.bat" used to launch the Qt Open Source Command Line from the classic installer. I need some help

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Please show us your first error.

  3. #3
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Qt Code:
    1. Microsoft Windows XP [version 5.1.2600]
    2. (C) Copyright 1985-2001 Microsoft Corp.
    3.  
    4. D:\Applications\Qt\4.3.2>mingw32-make
    5. cd src\winmain\ && mingw32-make -f Makefile
    6. mingw32-make[1]: Entering directory `D:/Applications/Qt/4.3.2/src/winmain'
    7. mingw32-make -f Makefile.Release
    8. mingw32-make[2]: Entering directory `D:/Applications/Qt/4.3.2/src/winmain'
    9. mingw32-make[2]: Nothing to be done for `first'.
    10. mingw32-make[2]: Leaving directory `D:/Applications/Qt/4.3.2/src/winmain'
    11. mingw32-make[1]: Leaving directory `D:/Applications/Qt/4.3.2/src/winmain'
    12. cd src\tools\moc\ && mingw32-make -f Makefile
    13. mingw32-make[1]: Entering directory `D:/Applications/Qt/4.3.2/src/tools/moc'
    14. mingw32-make -f Makefile.Release
    15. mingw32-make[2]: Entering directory `D:/Applications/Qt/4.3.2/src/tools/moc'
    16. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    17. -DQT_BOOTSTRAPPED -DQT_MOC -DQT_NO_CODECS -DQT_LITE_UNICODE -DQT_NO_LIBRARY -DQT
    18. _NO_STL -DQT_NO_COMPRESS -DQT_NO_DATASTREAM -DQT_NO_TEXTSTREAM -DQT_NO_TEXTCODEC
    19. -DQT_NO_UNICODETABLES -DQT_NO_THREAD -DQT_NO_REGEXP -DQT_NO_QOBJECT -DQT_NO_SYS
    20. TEMLOCALE -DQT_NO_GEOM_VARIANT -DQT_NODLL -I"..\..\corelib\arch\generic" -I"..\.
    21. .\..\include" -I"." -I"..\..\..\include\QtCore" -I"." -I"." -I"..\..\..\mkspecs\
    22. win32-g++" -o release\qfsfileengine.o ..\..\corelib\io\qfsfileengine.cpp
    23. ../../corelib/io/qfsfileengine.cpp: In member function `bool
    24. QFSFileEnginePrivate::openFh(QFlags<QIODevice::OpenModeFlag>, FILE*)':
    25. ../../corelib/io/qfsfileengine.cpp:240: `::fseeko64' undeclared (first use
    26. here)
    27. ../../corelib/io/qfsfileengine.cpp: In member function `qint64
    28. QFSFileEnginePrivate::posFdFh() const':
    29. ../../corelib/io/qfsfileengine.cpp:453: `::ftello64' undeclared (first use
    30. here)
    31. ../../corelib/io/qfsfileengine.cpp: In member function `bool
    32. QFSFileEnginePrivate::seekFdFh(long long int)':
    33. ../../corelib/io/qfsfileengine.cpp:483: `off64_t' undeclared (first use this
    34. function)
    35. ../../corelib/io/qfsfileengine.cpp:483: (Each undeclared identifier is reported
    36.  
    37. only once for each function it appears in.)
    38. ../../corelib/io/qfsfileengine.cpp: In member function `qint64
    39. QFSFileEnginePrivate::readLineFdFh(char*, long long int)':
    40. ../../corelib/io/qfsfileengine.cpp:628: `off64_t' undeclared (first use this
    41. function)
    42. ../../corelib/io/qfsfileengine.cpp:628: parse error before `=' token
    43. ../../corelib/io/qfsfileengine.cpp:633: `oldPos' undeclared (first use this
    44. function)
    45. mingw32-make[2]: *** [release\qfsfileengine.o] Error 1
    46. mingw32-make[2]: Leaving directory `D:/Applications/Qt/4.3.2/src/tools/moc'
    47. mingw32-make[1]: *** [release] Error 2
    48. mingw32-make[1]: Leaving directory `D:/Applications/Qt/4.3.2/src/tools/moc'
    49. mingw32-make: *** [sub-moc-make_default-ordered] Error 2
    50.  
    51. D:\Applications\Qt\4.3.2>
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Looks like you didn't install mingw correclty/completely.
    There is an installer available on their site that downloads and install everything you need.

  5. #5
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    I've downloaded "MinGW-5.1.3.exe". In the install dialog, I selected to install the current version. I didn't modified my Environment Variables, because I installed it in the same path as the old version.

    Running a "mingw32-make" for "cmd.exe" returned me the following error after a few seconds :

    Qt Code:
    1. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    2. -DQT_BOOTSTRAPPED -DQT_MOC -DQT_NO_CODECS -DQT_LITE_UNICODE -DQT_NO_LIBRARY -DQT
    3. _NO_STL -DQT_NO_COMPRESS -DQT_NO_DATASTREAM -DQT_NO_TEXTSTREAM -DQT_NO_TEXTCODEC
    4. -DQT_NO_UNICODETABLES -DQT_NO_THREAD -DQT_NO_REGEXP -DQT_NO_QOBJECT -DQT_NO_SYS
    5. TEMLOCALE -DQT_NO_GEOM_VARIANT -DQT_NODLL -I"..\..\corelib\arch\generic" -I"..\.
    6. .\..\include" -I"." -I"..\..\..\include\QtCore" -I"." -I"." -I"..\..\..\mkspecs\
    7. win32-g++" -o release\qfsfileengine_iterator_win.o ..\..\corelib\io\qfsfileengin
    8. e_iterator_win.cpp
    9. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    10. oc -Wl,-s -Wl,-subsystem,console -mthreads -Wl -o "..\..\..\bin\moc.exe" object_
    11. script.moc.Release
    12. ./release\qiodevice.o:qiodevice.cpp:(.rdata$_ZTI16QIODevicePrivate[typeinfo for
    13. QIODevicePrivate]+0x0): multiple definition of `typeinfo for QIODevicePrivate'
    14. ./release\qbuffer.o:qbuffer.cpp:(.data$_ZTI16QIODevicePrivate[typeinfo for QIODe
    15. vicePrivate]+0x0): first defined here
    16. ./release\qiodevice.o:qiodevice.cpp:(.rdata$_ZTS16QIODevicePrivate[typeinfo name
    17. for QIODevicePrivate]+0x0): multiple definition of `typeinfo name for QIODevice
    18. Private'
    19. ./release\qbuffer.o:qbuffer.cpp:(.text$_ZTS16QIODevicePrivate[typeinfo name for
    20. QIODevicePrivate]+0x0): first defined here
    21. ./release\qiodevice.o:qiodevice.cpp:(.rdata$_ZTI9QIODevice[typeinfo for QIODevic
    22. e]+0x0): multiple definition of `typeinfo for QIODevice'
    23. ./release\qbuffer.o:qbuffer.cpp:(.data$_ZTI9QIODevice[typeinfo for QIODevice]+0x
    24. 0): first defined here
    25. ./release\qiodevice.o:qiodevice.cpp:(.rdata$_ZTS9QIODevice[typeinfo name for QIO
    26. Device]+0x0): multiple definition of `typeinfo name for QIODevice'
    27. ./release\qbuffer.o:qbuffer.cpp:(.text$_ZTS9QIODevice[typeinfo name for QIODevic
    28. e]+0x0): first defined here
    29. ./release\qtemporaryfile.o:qtemporaryfile.cpp:(.rdata$_ZTI12QFilePrivate[typeinf
    30. o for QFilePrivate]+0x0): multiple definition of `typeinfo for QFilePrivate'
    31. ./release\qfile.o:qfile.cpp:(.data$_ZTI12QFilePrivate[typeinfo for QFilePrivate]
    32. +0x0): first defined here
    33. ./release\qtemporaryfile.o:qtemporaryfile.cpp:(.rdata$_ZTS12QFilePrivate[typeinf
    34. o name for QFilePrivate]+0x0): multiple definition of `typeinfo name for QFilePr
    35. ivate'
    36. ./release\qfile.o:qfile.cpp:(.text$_ZTS12QFilePrivate[typeinfo name for QFilePri
    37. vate]+0x0): first defined here
    38. ./release\qtemporaryfile.o:qtemporaryfile.cpp:(.rdata$_ZTI5QFile[typeinfo for QF
    39. ile]+0x0): multiple definition of `typeinfo for QFile'
    40. ./release\qfile.o:qfile.cpp:(.data$_ZTI5QFile[typeinfo for QFile]+0x0): first de
    41. fined here
    42. ./release\qtemporaryfile.o:qtemporaryfile.cpp:(.rdata$_ZTS5QFile[typeinfo name f
    43. or QFile]+0x0): multiple definition of `typeinfo name for QFile'
    44. ./release\qfile.o:qfile.cpp:(.text$_ZTS5QFile[typeinfo name for QFile]+0x0): fir
    45. st defined here
    46. collect2: ld returned 1 exit status
    47. mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
    48. mingw32-make[2]: Leaving directory `D:/Applications/Qt/4.3.2/src/tools/moc'
    49. mingw32-make[1]: *** [release] Error 2
    50. mingw32-make[1]: Leaving directory `D:/Applications/Qt/4.3.2/src/tools/moc'
    51. mingw32-make: *** [sub-moc-make_default-ordered] Error 2
    52.  
    53. D:\Applications\Qt\4.3.2>
    To copy to clipboard, switch view to plain text mode 


  6. #6
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Please try a clean src dir.

  7. #7
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    -> mingw32-make clean
    -> mingw32-make

    The built isn't finished, but it seems to work.
    What happened ? The classes incorrectly built with the bad version of MinGW weren't rebuilt with the correct version of MinGW ?

  8. #8
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Hello,

    I've now a correct static release build of Qt4.3.2 under Windows XP.
    My problem is that I would like to use the Qt tools, like Qt Assistant or Qt Designer.
    I suppose I've to build them... But I can't achieve to do that.

    When I go in my Qt directory, I've the "src" dir and the "tools" dir. So I go in my "tools" dir and I "mingw32-make clean, mingw32-make" it. All works well, I get no errors, but at the end I can't find any result : no .exe file, no "release" dir...

    Could you help me to build my Qt Tools under Windows XP with MinGW, please ?

  9. #9
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Quote Originally Posted by Nyphel View Post
    When I go in my Qt directory, I've the "src" dir and the "tools" dir. So I go in my "tools" dir and I "mingw32-make clean, mingw32-make" it. All works well, I get no errors, but at the end I can't find any result : no .exe file, no "release" dir...
    Should be in $QTDIR/bin.
    J-P Nurmi

  10. The following user says thank you to jpn for this useful post:

    Nyphel (30th October 2007)

  11. #10
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build Qt4.3.2 from sources with MinGW under WinXP

    Oh yes it is...
    Thanks JPN !

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.