Results 1 to 6 of 6

Thread: CMake fails on Windows 7 64-bit

  1. #1
    Join Date
    Nov 2006
    Location
    New Malden, UK
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default CMake fails on Windows 7 64-bit

    Hi everyone,

    I recently upgraded to Windows 7 and decided to use the 64-bit version (I had previously been using 32-bit Vista). I've been developing using Qt 4 with MinGW and CMake. However, when I tried running CMake on my project, it failed to run a test compile and aborted. This was the output:

    Qt Code:
    1. -- The C compiler identification is GNU
    2. -- The CXX compiler identification is GNU
    3. -- Check for working C compiler: C:/QtSDK/mingw/bin/gcc.exe
    4. -- Check for working C compiler: C:/QtSDK/mingw/bin/gcc.exe -- broken
    5. CMake Error at C:/Program Files x86/CMake 2.8/share/cmake-2.8/Modules/CMakeTestC
    6. Compiler.cmake:52 (MESSAGE):
    7. The C compiler "C:/QtSDK/mingw/bin/gcc.exe" is not able to compile a simple
    8. test program.
    9.  
    10. It fails with the following output:
    11.  
    12. Change Dir: C:/Users/Yusuf Smith/hg/qtm-1.4/CMakeFiles/CMakeTmp
    13.  
    14.  
    15.  
    16. Run Build Command:C:/QtSDK/mingw/bin/mingw32-make.exe
    17. "cmTryCompileExec/fast"
    18.  
    19. C:/QtSDK/mingw/bin/mingw32-make.exe -f
    20. CMakeFiles\cmTryCompileExec.dir\build.make
    21. CMakeFiles/cmTryCompileExec.dir/build
    22.  
    23. C:/QtSDK/mingw/bin/mingw32-make.exe: Interrupt/Exception caught (code =
    24. 0xc0000005, addr = 0x41f96e)
    25.  
    26.  
    27.  
    28.  
    29.  
    30. CMake will not be able to correctly generate this project.
    31. Call Stack (most recent call first):
    32. CMakeLists.txt:1 (project)
    33.  
    34.  
    35. -- Configuring incomplete, errors occurred!
    To copy to clipboard, switch view to plain text mode 

    I have seen in some places the solution of making sure there are no parentheses in the PATH (such as "Program Files (x86)" which is found on most 64-bit Windows installations). Although this exists on my system, it's not in the PATH when running the Qt command prompt.

    Any ideas?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: CMake fails on Windows 7 64-bit

    Spaces in paths are often troublesome, but I don't think that's the issue here.

    The error from mingw32-make is a general access violation (NULL pointer, invalid pointer access etc.) If you cannot run mingw32-make from the same command line as CMake then the problem is not CMake. Is your MingW install functional at all?

  3. #3
    Join Date
    Nov 2006
    Location
    New Malden, UK
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: CMake fails on Windows 7 64-bit

    Quote Originally Posted by ChrisW67 View Post
    Spaces in paths are often troublesome, but I don't think that's the issue here.

    The error from mingw32-make is a general access violation (NULL pointer, invalid pointer access etc.) If you cannot run mingw32-make from the same command line as CMake then the problem is not CMake. Is your MingW install functional at all?
    I haven't tried, other than trying to compile this program. It's the same MinGW that came with the most recent Qt SDK (version 1.1.3, Qt v4.7.4). I haven't tried to run make, as I've no Makefile until CMake is run.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: CMake fails on Windows 7 64-bit

    CMake is failing because mingw32-make is failing. You won't fix CMake until you can run mingw32-make from the command prompt you are using.

    Run the "Qt 4.7.4 for Desktop (MinGW)" from Start > Qt SDK > Desktop to get a working Qt command prompt. Then try "mingw32-make -v" to verify that at least this much is working before trying to use CMake.

  5. #5
    Join Date
    Nov 2006
    Location
    New Malden, UK
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: CMake fails on Windows 7 64-bit

    Quote Originally Posted by ChrisW67 View Post
    CMake is failing because mingw32-make is failing. You won't fix CMake until you can run mingw32-make from the command prompt you are using.

    Run the "Qt 4.7.4 for Desktop (MinGW)" from Start > Qt SDK > Desktop to get a working Qt command prompt. Then try "mingw32-make -v" to verify that at least this much is working before trying to use CMake.

    Qt Code:
    1. C:\Windows\system32>mingw32-make -v
    2. GNU Make 3.81
    3. Copyright (C) 2006 Free Software Foundation, Inc.
    4. This is free software; see the source for copying conditions.
    5. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    6. PARTICULAR PURPOSE.
    7.  
    8. This program built for i386-pc-mingw32
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Nov 2006
    Location
    New Malden, UK
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: CMake fails on Windows 7 64-bit

    Update: the problem was solved by installing the library-only download (instead of the Qt SDK) and the separate MinGW zipfile from the Qt Downloads page. The problem is obviously with the SDK. I do not use Qt Creator anyway (I use Vim and the command line).

Similar Threads

  1. CMake and Qt on Windows using MinGW
    By woodtluk in forum General Discussion
    Replies: 1
    Last Post: 26th December 2010, 19:04
  2. Compilation fails in Windows XP
    By sim in forum Newbie
    Replies: 3
    Last Post: 1st July 2010, 16:56
  3. CMake Windows console issue
    By IndigoJo in forum Qt Programming
    Replies: 0
    Last Post: 23rd March 2008, 22:12
  4. Qt with cmake on windows xp
    By Ashish in forum Newbie
    Replies: 1
    Last Post: 6th October 2006, 22:59
  5. gcc (linux) : ok ; g++ (windows) : fails
    By nouknouk in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2006, 03:08

Tags for this Thread

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.