这些是我在使用MinGW64 + MSYS键入CMAKE-3.2.3的./configure
时收到的消息。
CMake 3.2.3, Copyright 2000-2015 Kitware, Inc.
Found GNU toolchain
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
然后,当Bootstrap.cmk/cmake_bootstrap.log
中止./configure
时,我发送了两条消息,这些消息可能与上述消息有关。
这些是cmake_bootstrap.log
c:/src/products/oss/cmake-3.2.3/Source/kwsys/kwsysPlatformTestsCXX.cxx:4
33:28: error: 'setenv' was not declared in this scope^M"
c:/src/products/oss/cmake-3.2.3/Source/kwsys/kwsysPlatformTestsCXX.cxx:4
41:15: error: 'unsetenv' was not declared in this scope^M"
现在我的问题是,
如何让我的c ++有setenv
和unsetenv
?
有谁知道哪个版本的C ++有setenv
和unsetenv
?
答案 0 :(得分:1)
您需要加入stdlib.h
:
#include <cstdlib>