Results 1 to 5 of 5

Thread: Qt vista compile

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Qt vista compile

    I'm compiling Qt 4.3.2 in vista with the following bat file running as administrator

    Qt Code:
    1. set MINGWROOT=C:\Dev\Qt\MinGW
    2. set MINGWBIN=%MINGWROOT%\bin
    3. set MINGWINCLUDE=%MINGWROOT%\include
    4. set MINGWLIB=%MINGWROOT%\lib
    5. set MINGWLIBEXEC=%MINGWROOT%\libexec\gcc\mingw32\3.4.2
    6. set MINGWBIN2=%MINGWROOT%\mingw32\bin
    7. set MINGWLIB2=%MINGWROOT%\mingw32\lib\ldscripts
    8. set MINGW=%MINGWROOT%;%MINGWBIN%;%MINGWINCLUDE%;%MINGWLIB%;%MINGWLIBEXEC%;%MINGWLIB2%;%MINGWLIB2%
    9.  
    10. set QTDIR=C:\Dev\Qt\4.3.2
    11. set PATH=%MINGW%;C:\Dev\Qt\4.3.2\bin
    12. set PATH=%PATH%;C:\Dev\Qt\MinGW\bin
    13. set PATH=%PATH%;%SystemRoot%\System32
    14. set QMAKESPEC=win32-g++
    15.  
    16. path
    17.  
    18. if not "%1"=="compile_debug" goto END
    19. cd %QTDIR%
    20. echo This will configure and compile qt in debug.
    21. echo The release libraries will not be recompiled.
    22. pause
    23. configure -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -qt-gif
    24. cd %QTDIR%\src
    25. qmake
    26. mingw32-make debug
    To copy to clipboard, switch view to plain text mode 

    I get those includes errors:

    Qt Code:
    1. In file included from ..\..\3rdparty\zlib\crc32.c:29:
    2. ..\..\3rdparty\zlib\/zutil.h:21:24: stddef.h: No such file or directory
    3. ..\..\3rdparty\zlib\/zutil.h:23:22: string.h: No such file or directory
    4. ..\..\3rdparty\zlib\/zutil.h:24:22: stdlib.h: No such file or directory
    5. ..\..\3rdparty\zlib\/zutil.h:38:23: errno.h: No such file or directory
    6. ..\..\3rdparty\zlib\crc32.c:36:24: limits.h: No such file or directory
    7. mingw32-make[2]: *** [tmp\obj\release_shared\crc32.o] Error 1
    8. mingw32-make[2]: Leaving directory `C:/Dev/Qt/4.3.2/src/tools/rcc'
    9. mingw32-make[1]: *** [release] Error 2
    10. mingw32-make[1]: Leaving directory `C:/Dev/Qt/4.3.2/src/tools/rcc'
    11. mingw32-make: *** [debug-C__Qt_4_3_2_src_tools_rcc] Error 2
    To copy to clipboard, switch view to plain text mode 

    I've seen other people having the same issues, so I updated the Mingw runtime, but it doesn't seem to fix anything.

    Any idea?

  2. #2
    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: Qt vista compile

    Yes, I've had the same problem. The mingw directory has to be placed in a root folder, such as c:\mingw.

  3. The following 2 users say thank you to marcel for this useful post:

    bunjee (20th November 2007), Teerayoot (20th November 2007)

  4. #3
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Qt vista compile

    Thanks man,

    Jeez, I thought those issues were fixed since Windows Nt...

  5. #4
    Join Date
    Sep 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt vista compile

    I'm getting exactly the same error using QT 4.4.2 and the Mingw 5.14 installer under WinXP but I've already installed Mingw into c:\mingw so unfortunately that hasn't resolved the issue. I notice that stddef.h is located in two directories

    C:\MinGW\lib\gcc\mingw32\3.4.5\include
    C:\MinGW\lib\gcc\mingw32\3.4.5\install-tools\include

    and I've tried adding these to the PATH but still get the same issue. Is there something I need to set when initially running the QT configure stage to include these paths or is this issue more related to Mingw?

  6. #5
    Join Date
    Sep 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt vista compile

    Well I figured it out in the end. It's a PATH order issue although I'm not sure what else in my path was causing the problem. By doing a

    set path=c:\mingw\bin;%PATH%

    just prior to running the make it gets things working. Changing the PATH in the Environment options in System under the control panel to have the mingw path at the start of the PATH does not guarantee the bin directory will be at the start of the PATH when running a command prompt. Extra paths get added to the beginning when the command prompt is started so safest bet is to reset the mingw path as a double check.

    What does surprise me is that after doing a bit of a search over the net this issue is so common and not just with QT builds. Even more surprising is I didn't find any posts that mentioned doing the above. Many users with the issue went on to use a different compiler instead of mingw.

Similar Threads

  1. Replies: 3
    Last Post: 4th September 2007, 14:40
  2. QT 4.3 + vista + QMYSQL
    By ldsjohn in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 07:48
  3. Use VC2005 to compile Qt program (4.3.0)
    By firegun9 in forum Qt Programming
    Replies: 3
    Last Post: 8th June 2007, 16:04
  4. Qt-4.2.2 qmake won't compile under visual studio 2005 on vista
    By moowy in forum Installation and Deployment
    Replies: 7
    Last Post: 13th January 2007, 21:06
  5. Compile Errors
    By luffy27 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2006, 05:26

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.