我在Windows 7 64位下构建项目时遇到问题.我已经在SO上看过类似的问题,但没有找到合适的解决方案.当我跑:
cmake -v -G "MSYS Makefiles" CMakeLists.txt
它给了我以下输出:
> -- The C compiler identification is unknown -- Check for working C compiler: c:/MinGW/bin/gcc.exe -- Check for working C compiler: c:/MinGW/bin/gcc.exe -- broken CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCo mpiler.cmake:61 (message): The C compiler "c:/MinGW/bin/gcc.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programmi ng/glfw/CMakeFiles/CMakeTmp Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe" "cmTryCompileExec1735268707/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec1735268707.dir/build.make CMakeFiles/cmTryCompileExec1735268707.dir/build make[1]: Entering directory `/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMak eFiles/CMakeTmp' "/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake Files/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake Files/CMakeTmp/testCCompiler.c make[1]: *** [CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error 1 make[1]: Leaving directory
另外我得到下一个错误消息3次,在编译尝试期间,它说"过程入口点libintl_setlocale无法位于库libintl-8.dll"
CMakeError.log:
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-c
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-Aa
输出为:1:0:1:错误:缺少'('在谓词之后
检查C编译器是否使用""IAR与"IAR.+编译器"不匹配:gcc.exe:致命错误:没有输入文件编译终止.使用以下输出确定C编译器是否工作失败:更改目录:C:/ Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
运行构建命令: "C:/MinGW/msys/1.0/bin/make.exe" "cmTryCompileExec2453403923 /快"的/ usr/bin中/让-f CMakeFiles/cmTryCompileExec2453403923.dir/build.make CMakeFiles/cmTryCompileExec2453403923.dir /化妆建设[1]:进入目录
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' "/c/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: Leaving directory
/ C /用户/索尼/文档/ Computer_Graphics/assignment_01 /编程/ GLFW/CMakeFiles/CMakeTmp"使[1]:*[CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj]错误1个化妆:* [cmTryCompileExec2453403923/fast]错误2编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-c
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-Aa
输出为:1:0:1:错误:缺少'('在谓词之后
检查C编译器是否使用""IAR与"IAR.+编译器"不匹配:gcc.exe:致命错误:没有输入文件编译终止.使用以下输出确定C编译器是否工作失败:更改目录:C:/ Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
运行构建命令: "C:/MinGW/msys/1.0/bin/make.exe" "cmTryCompileExec78678067 /快"的/ usr/bin中/让-f CMakeFiles/cmTryCompileExec78678067.dir/build.make CMakeFiles/cmTryCompileExec78678067.dir /化妆建设[1]:进入目录
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' "/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: make[1]: Leaving directory
/ C /用户/索尼/文档/ Computer_Graphics/assignment_01 /编程/ GLFW/CMakeFiles/CMakeTmp" *[CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj]错误1个化妆:* [cmTryCompileExec78678067 /快]错误2编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-c
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-Aa
输出为:1:0:1:错误:缺少'('在谓词之后
检查C编译器是否使用""IAR与"IAR.+编译器"不匹配:gcc.exe:致命错误:没有输入文件编译终止.使用以下输出确定C编译器是否工作失败:更改目录:C:/ Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
运行构建命令: "C:/MinGW/msys/1.0/bin/make.exe" "cmTryCompileExec1735268707 /快"的/ usr/bin中/让-f CMakeFiles/cmTryCompileExec1735268707.dir/build.make CMakeFiles/cmTryCompileExec1735268707.dir /化妆建设[1]:输入目录
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' "/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: *** [CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error 1 make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'make:***[cmTryCompileExec1735268707/fast]错误2编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:
输出结果为:1
编译C编译器标识源文件"CMakeCCompilerId.c"失败.编译器:c:/MinGW/bin/gcc.exe构建标志:Id标志:-c
输出结果为:1
我的路径环境变量:
C:\ Program Files(x86)\ PC连接解决方案\; C:\ Program Files\Common Files\Microsoft Shared\Windows Live; C:\ Program Files(x86)\ Common Files\Microsoft Shared\Windows Live; c:\程序文件(x86)\ Intel\iCLS Client \; c:\ Program Files\Intel\iCLS Client \; C:\ Program Files(x86)\ AMD APP\bin\x86_64; C:\ Program Files(x86)\ AMD APP\BIN\86;的%SystemRoot%\ SYSTEM32;的%SystemRoot%;%SYSTEMROOT%\ SYSTEM32\WBEM;%SYSTEMROOT%\ SYSTEM32\WindowsPowerShell\V1.0 \; C:\ Program Files文件(x86)的\ ATI技术\ ATI .ACE\Core-Static; C:\ Program Files\Intel\Intel(R)管理引擎组件\ DAL; C:\ Program Files\Intel\Intel(R)管理引擎组件\ IPT; C:\ Program Files(x86 )\\Intel\Intel(R)管理引擎组件\ DAL; C:\ Program Files(x86)\ Intel\Intel(R)管理引擎组件\ IPT; C:\ Program Files\Sony\VAIO改进\; C:\程序文件(x86)\ Sony\VAIO启动设置工具; C:\ Program Files(x86)\ Windows Live\Shared; c:\ Program Files(x86)\ Microsoft SQL Server\100\Tools\Binn \; c:\ Program Files\Microsoft SQ L Server\100\Tools\Binn \; c:\ Program Files\Microsoft SQL Server\100\DTS\Binn \; C:\ Program Files(x86)\ MVActiveX \; C:\ Java\jdk1.7.0_09\bin ; C:\ Program Files\Microsoft\Web Platform Installer \; C:\ Program Files(x86)\ Microsoft ASP.NET\ASP.NET Web Pages\v1.0 \; C:\ Program Files(x86)\ Windows Kits\8.0\Windows Performance Toolkit \; C:\ Program Files\Microsoft SQL Server\110\Tools\Binn \; C:\ Program Files\TortoiseHg \; C:\ Program Files\MATLAB\R2013a\runtime\win64; C:\Program Files\MATLAB\R2013a\bin; C:\ MinGW\bin; C:\ Program Files(x86)\ CMake\bin
我安装并重新安装了mingw并调查了我的路径变量,但仍然没有解决方案.任何想法,我错了?