首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >cmake cygwin make.exe错误

cmake cygwin make.exe错误
EN

Stack Overflow用户
提问于 2012-11-05 08:11:09
回答 1查看 5.8K关注 0票数 6

我有一个关于CMake 2.8.9的问题。我使用GUI。我尝试制作一个makefile (ogre 1.8)。

因为我使用的是Windows7 x64,所以我将CygWin与gcc.exe、g++.exe和make.exe (位于bin目录中)一起使用。

当我尝试“配置”时,CMake记录了以下错误:

代码语言:javascript
代码运行次数:0
运行
复制
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!

鉴于D e r B e f e h l“m T r y C o m p i l e.......

表示“命令”mTryCompile……“拼写错误或找不到

代码语言:javascript
代码运行次数:0
运行
复制
$ 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.
代码语言:javascript
代码运行次数:0
运行
复制
gcc-Version 4.5.3 (GCC)

我的缓存如下所示:

代码语言:javascript
代码运行次数:0
运行
复制
//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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-11-05 15:43:12

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

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13224368

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档