使用cygwin从Nmake切换到MinGW

Switch from Nmake into MinGW using cygwin

本文关键字:MinGW Nmake cygwin 使用      更新时间:2023-10-16

如何使用 cmake ???使用 MingW 而不是 Nmake

我安装了 cygwin,并在 Windows 7 x64 上安装了 Mingw、gcc、g++ 和 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!
你应该

选择

MinGW makefiles.

如果gcc不在路径中,则应选择

指定本机编译器

将路径指向编译器二进制文件。