我有一个项目需要编译,这是该项目的自述文件,
Geodesic Object Proposals
=========================
Dependencies
------------
Required:
* cmake
* c++11 compiler( g++-4.7 or higher, vc++2013 or higher, clang might work too )
* Eigen 3.2 (optionally you can download eigen and put in in external/eigen such that external/eigen/Eigen is a valid directory)
* libpng and libjpg (needed by cimg)
Optional for python3 bindings:
* python3 (python 2.7 should work too, but I didn't test it extensively)
* numpy
* boost-python
* matio (optional to load datasets)
* matplotlib for some visualizations
* MATLAB (r2013a on Ubuntu 14.04 tested, others might work too. You might have to specify a new gcc version in mexopts)
实际上我使用的是 ubuntu,它默认的 cmake 版本是 2.8.12.2,当我尝试配置我的项目时,我选择将 unix makefiles 用作当前生成器,我应该下载 readme 中提到的 c++11 编译器之一吗?我遇到了几个错误
CMAKE_BACKWARDS_COMPATIBILITY 2.4
CMAKE_BUILD_TYPE
CMAKE_COLOR_MAKEFILE
CMAKE_CXX_COMPILER-NOTFOUND
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINIZEREL
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_COMPILER /usr/bin/cc
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_LINKER /usr/bin/ld
CMAKE_MAKE_PROGRAM /usr/bin/make
还有很多其他感谢
答案1
运行以下命令:
sudo apt-get install build-essential
g++
Trusty的最新版本是 4.8.2
使用以下命令进行安装:
sudo apt-get install g++