csympy cmake错误:编译器不支持C ++ 11构造

linuxfreebird
sudo apt-get install cmake libgmp-dev
sudo cmake .
sudo make

我尝试按照上述说明从gitub安装csympy。

running install
running build
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at CMakeLists.txt:38 (message):
  Compiler does not support C++11 constructs

  CXX11 ERROR LOG :


-- Configuring incomplete, errors occurred!
See also "/home/user/Downloads/csympy-master/CMakeFiles/CMakeOutput.log".
See also "/home/user/Downloads/csympy-master/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 118, in <module>
    'install' : InstallWithCmake,
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 99, in run
    _install.run(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
    self.run_command('build')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 69, in run
    cmake_build()
  File "setup.py", line 39, in cmake_build
    raise EnvironmentError("error calling cmake")
EnvironmentError: error calling cmake

但是我在cmake期间收到了以上错误。我检查了突触是否已安装gcc-4.8。

cmake -std=c++0x .
cmake -std=c++11 .

我强迫cmake使用上面的以下编译器,但是我收到错误消息,指出指定的源目录不存在。我缺少什么来编译csympy cmake?

伊苏鲁夫

您缺少C ++编译器。安装g ++

sudo apt-get install g++

之后,你需要清洁回购git clean -dfx和运行cmake .python setup.py install再次

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章