Configure
버튼을 누르면 CMake에 이상한 문제가 있습니다.CMake 보고서가 깨진 g ++ 및 누락 된 libiconv-2.dll
항상 libiconv-2.dll
이 누락되어 작동을 완료하지 못하는 것으로보고합니다. 그러나이 라이브러리는 MinGW/bin 폴더에 있습니다.
나는 CodeBlocks-MinGW Makefiles와 CMake 버전 3.6.1 - 32 비트 버전을 사용하고있다. (이 문제는 64 비트 버전에도 있지만).
The CXX compiler identification is unknown
Check for working CXX compiler: C:/MinGW/bin/g++.exe
Check for working CXX compiler: C:/MinGW/bin/g++.exe -- broken
는 MinGW가 제대로 시스템 경로에 추가되고 내가 버전 (GNU 4.8.1)을 확인하고 또한 사용하여 명령 줄에서 간단한 인사 세계를 컴파일 할 수 있었다 : 한 가지 흥미로운 점은 CONSOL에 보여줍니다 것입니다 :
g++ test.cpp -o test
동일한 CMakeLists 파일을이 구성으로 테스트했지만 구형 CMake 버전 3.2.3은 모두 작동합니다. 온라인으로 일부 조사하기이 파일의 문제점은 새로운 것이 아니므로 버전 문제인지 의심 스럽습니다.
누구든지 더 잘 할 수있는 아이디어가 있습니까?
EDIT 1 이 내가 수동으로 g을 사용하여 파일 testCXXCompiler.cpp
을 컴파일 ++하고 일 CMakeError.log
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: C:/MinGW/bin/g++.exe Build flags: Id flags:
The output was: 1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: C:/MinGW/bin/g++.exe Build flags: Id flags: -c
The output was: 1
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": g++.exe: fatal error: no input files compilation terminated. Determining if the CXX compiler works failed with the following output: Change Dir: C:/Users/testuser/Desktop/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_c9a03/fast" C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_c9a03.dir\build.make CMakeFiles/cmTC_c9a03.dir/build
mingw32-make.exe 1 : Entering directory 'C:/Users/testuser/Desktop/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c9a03.dir/testCXXCompiler.cxx.obj
C:\MinGW\bin\g++.exe -o CMakeFiles\cmTC_c9a03.dir\testCXXCompiler.cxx.obj -c C:\Users\testuser\Desktop\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx
CMakeFiles\cmTC_c9a03.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_c9a03.dir/testCXXCompiler.cxx.obj' failed
mingw32-make.exe 1 : *** [CMakeFiles/cmTC_c9a03.dir/testCXXCompiler.cxx.obj] Error 1
mingw32-make.exe 1 : Leaving directory 'C:/Users/testuser/Desktop/build/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_c9a03/fast' failed
mingw32-make.exe: *** [cmTC_c9a03/fast] Error 2
의 내용이다. 컴파일하는 동안 오류가 발생하지 않았습니다.
나는 문제는 일부 종속 또는 다른 코드와 관련된 것들로없는 경우 테스트 SSCCE을 만든 2
편집 할 수 있습니다. 그러나이 파일을 테스트 : 나는 아직도 라이브러리를 누락 문제가
#include <iostream>
int main()
{
std::cout << "Test" << std::endl;
return 0;
}
CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project(Test)
add_executable(Test test.cpp)
Test.cpp에. 콘솔 출력은 약간 변경되었지만 이제는 다음과 같습니다.
The C compiler identification is unknown
The CXX 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
MinGW가 손상된 것 같습니다. – usr1234567
@ usr1234567 다른 모든 경우에서 MinGW로 컴파일 할 수 있기 때문에 의심 스럽습니다. Code :: Blocks의 명령 줄에서 – sebap123
CMake가 주어진 명령과 동일한 명령을 사용하여 CMake가 CMakeError.out 파일에 제공하는 테스트 프로그램을 컴파일 할 수 있습니까? – usr1234567