如何让我的 c++ 有 setenv
How to make my c++ have setenv?
这些是我在用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
?
您需要
包含stdlib.h
:
#include <cstdlib>