2012-05-22 91 views
1

如何使用MingW代替Nmake使用cmake?使用cygwin從Nmake切換到MinGW

我已經cygwin的使用MinGW,GCC,G ++安裝,並在Windows 7 X64的

安裝GDB當我嘗試這個命令:

cmake 

我得到含有這種長期錯誤:

-- Building for: NMake Makefiles 
-- The C compiler identification is unknown 
-- The CXX compiler identification is unknown 
CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Ple 
ase set CMAKE_RC_COMPILER to a valid compiler path or name. 
-- Check for CL compiler version 
-- Check for CL compiler version - failed 
-- Check if this is a free VC compiler 
-- Check if this is a free VC compiler - yes 
-- Using FREE VC TOOLS, NO DEBUG available 
-- Check for working C compiler: cl 

    CMake will not be able to correctly generate this project. 
Call Stack (most recent call first): 



CMake Error: your C compiler: "cl" was not found. Please set CMAKE_C_COMPILER 
to a valid compiler path or name. 
CMake Error: your CXX compiler: "cl" was not found. Please set CMAKE_CXX_COMPI 
LER to a valid compiler path or name. 
-- Configuring incomplete, errors occurred! 

回答

0

你應該選擇

MinGW Makefiles。

如果gcc不在路徑,你應該選擇

指定本地編譯器

指向路徑編譯的二進制文件。