Answer the question
In order to leave comments, you need to log in
Why doesn't CMake generate files under MinGW without the CMAKE_GNUtoMS flag?
Hello,
I tried to build an example program for MinGW using CMake.
At first there was a problem that CMake did not see the compiler, it was solved by adding the path "C:\MinGW\bin" to the PATH variable. The error is gone, however, one more remains:
PS C:\test> cmake -G "MinGW Makefiles"
-- The C compiler identification is GNU 6.3.0
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:495 (file):
file STRINGS file "C:/test/CMakeFiles/3.11.0/CompilerIdCXX/a.exe" cannot be
read.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:37 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:501 (list):
list sub-command REMOVE_DUPLICATES requires list to be present.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:37 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:567 (file):
file failed to open for reading (Invalid argument):
C:/test/CMakeFiles/3.11.0/CompilerIdCXX/a.exe
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:37 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:569 (string):
string begin index: 1 is out of range 0 - 0
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:37 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:577 (math):
math cannot parse the expression: " * 16 + ": syntax error, unexpected
exp_TIMES, expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER
(2)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:37 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:579 (file):
file failed to open for reading (Invalid argument):
C:/test/CMakeFiles/3.11.0/CompilerIdCXX/a.exe
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:37 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "C:/test/CMakeFiles/CMakeOutput.log".
See also "C:/test/CMakeFiles/CMakeError.log".
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question