0

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

制作:没有规则可以制作“cmStandardIncludes.o”所需的目标“/cygdrive/e/software/pkg/cmake-2.8.12.2/Source /cmStandardIncludes.cxx”。停止。

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

输出:

E:\software\pkg\cmake-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
---------------------------------------------
4

1 回答 1

1

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

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

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

于 2014-01-29T18:53:09.420 回答