编译 cmake 失败



当我尝试从 MinGW MSYS2 系统上的源代码编译 cmake2.8.12.2 时,运行 sh 引导程序后出现以下错误:

make:没有规则来制作目标'/cygdrive/e/software/pkg/cmake-2.8.12.2/Source/cmStandardInclude.cxx',由 'cmStandardInclude.o' 需要。 停。

我已经检查了源目录并找到了cmStandardInclude.cxx.在这方面请提供帮助。谢谢你。

输出:

E:softwarepkgcmake-2.8.12.2>sh bootstrap
---------------------------------------------
CMake 2.8.12.2, Copyright 2000-2012 Kitware, Inc.
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: make
g++ is GNU compiler
g++ does not have setenv
g++ does not have unsetenv
g++ has environ in stdlib.h
g++ has STL in std:: namespace
g++ has ANSI streams
g++ has streams in std:: namespace
g++ has sstream
g++ has operator!=(string, char*)
g++ has stl iterator_traits
g++ has standard template allocator
g++ has allocator<>::rebind<>
g++ does not have non-standard allocator<>::max_size argument
g++ has stl containers supporting allocator objects
g++ has header cstddef
g++ requires template friends to use <>
g++ supports member templates
g++ has standard template specialization syntax
g++ has argument dependent lookup
g++ does not have struct stat with st_mtim member
g++ has ios::binary openmode
g++ has ANSI for scoping
---------------------------------------------
make: *** No rule to make target '/cygdrive/e/software/pkg/cmake-2.8.12.2/Source
/cmStandardIncludes.cxx', needed by 'cmStandardIncludes.o'.  Stop.
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /cygdrive/e/software/pkg/cmake-2.8.12.2/Bootstrap.cmk/cmake_boots
trap.log
---------------------------------------------

如果你想使用 MinGW编译器,我建议你使用 MinGW shell 提示符而不是 cygwin。这可确保正确设置多个 MinGW 编译器特定的环境变量。

请注意,如果您使用MSYS,则必须使用"MSYS Makefiles"生成器,并且make程序应简单地称为make(如果您已正确安装它),而如果您使用"MinGW Makefiles"作为生成器,则必须使用mingw32-make作为创建程序。

如果您生成"MinGW Makefiles"并调用make,则会调用错误的make程序。明确指定mingw32-make

最新更新