makefile - cmake cygwin make.exe错误

标签 makefile cygwin cmake

我在使用 CMake 2.8.9 时遇到问题。我使用图形用户界面。 我尝试制作一个 makefile (ogre 1.8)。
由于我使用的是 Windows 7 x64,因此我将 CygWin 与 gcc.exe、g++.exe 和 make.exe(位于 bin 目录中)一起使用。
当我尝试“配置”时,CMake 记录以下错误:

The C compiler identification is unknown
The CXX compiler identification is unknown
Check for working C compiler: G:/cygwin/bin/gcc.exe
Check for working C compiler: G:/cygwin/bin/gcc.exe -- broken
CMake Error at G:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "G:/cygwin/bin/gcc.exe" is not able to compile a simple test program.

It fails with the following output:

Change Dir: H:/Ogre/gcc18/CMakeFiles/CMakeTmp



Run Build Command:G:/cygwin/bin/make.exe "cmTryCompileExec2682355191/fast"

/usr/bin/make -f CMakeFiles\cmTryCompileExec2682355191.dir\build.make
CMakeFiles/cmTryCompileExec2682355191.dir/build

D e r B e f e h l " m T r y C o m p i l e E x e c 2 6 8 2 3 5 5 1 9 1 .  d i r " i s t e n t w e d e r f a l s c h g e s c h r i e b e n o d e r  k o n n t e   n i c h t   g e f u n d e n   w e r d e n . 

makeMakefile:116: recipe for target `cmTryCompileExec2682355191/fast' failed

: *** [cmTryCompileExec2682355191/fast] Error 1





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


Configuring incomplete, errors occurred!

而 Der Befehl "m 尝试编译.......
意思是“命令“mTryCompile......”拼写错误或找不到

$ make -version
GNU Make 3.82.90
Built for i686-pc-cygwin
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


gcc-Version 4.5.3 (GCC)

我的缓存如下所示:

//Path to a program.
CMAKE_AR:FILEPATH=G:/cygwin/bin/ar.exe

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=G:/cygwin/bin/g++.exe

//C compiler.
CMAKE_C_COMPILER:FILEPATH=G:/cygwin/bin/gcc.exe

//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=

//Flags used by the compiler during release minsize builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=

//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_C_FLAGS_RELEASE:STRING=

//Flags used by the compiler during Release with Debug Info builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=

//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=' '

//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/OGRE

//Path to a program.
CMAKE_LINKER:FILEPATH=G:/cygwin/bin/ld.exe

//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=G:/cygwin/bin/make.exe

//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=' '

//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_NM:FILEPATH=G:/cygwin/bin/nm.exe

//Path to a program.
CMAKE_OBJCOPY:FILEPATH=G:/cygwin/bin/objcopy.exe

//Path to a program.
CMAKE_OBJDUMP:FILEPATH=G:/cygwin/bin/objdump.exe

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=OGRE

//Path to a program.
CMAKE_RANLIB:FILEPATH=G:/cygwin/bin/ranlib.exe

//Path to a program.
CMAKE_SH:FILEPATH=G:/cygwin/bin/sh.exe

//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=' '

//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=OFF

//Path to a program.
CMAKE_STRIP:FILEPATH=G:/cygwin/bin/strip.exe

//If true, cmake will use relative paths in makefiles and projects.
CMAKE_USE_RELATIVE_PATHS:BOOL=ON

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF

CYGWIN:BOOL=ON

//Value Computed by CMake
OGRE_BINARY_DIR:STATIC=H:/Ogre/gcc18

//Value Computed by CMake
OGRE_SOURCE_DIR:STATIC=H:/Ogre/ogre_src_v1-8-1/ogre_src_v1-8-1

最佳答案

在 Cygwin 下,您无法使用常规的 Windows CMake 安装。您必须使用 Cygwin 安装程序安装 UNIX 版本的 CMake。

关于makefile - cmake cygwin make.exe错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13224368/

相关文章:

segmentation-fault - 如何在cygwin中使用 "*.stackdump"文件进行调试

c++ - 在 OS X 上使用 Boost Python 和 CMake

cmake - 对于cmake "include"命令,文件和模块有什么区别?

linux - 防止变量覆盖到 submakefile

在C文件中执行嵌入式lua编译错误

python - 有人在 Cygwin 上安装 MySQLdb for Python 吗?

cmake - cmake中十进制转十六进制

xcode - OSX 10.8、Xcode 4.4 Make 和 gcc 从环境中消失

c - 使用 GCC : Redirecting *. o 制定隐式规则

c++ - 热衷于不依赖 GNU Make 的依赖项的原子创建?