Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于CH3编译错误问题 #24

Open
RUNSONGchen opened this issue Sep 17, 2019 · 7 comments
Open

关于CH3编译错误问题 #24

RUNSONGchen opened this issue Sep 17, 2019 · 7 comments

Comments

@RUNSONGchen
Copy link

在ch3中建立build文件并对其进行cmake和make,make后出错如下:
error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \

我在CMAKESETListe.txt添加了( CMAKE_CXX_FLAGS "-std=c++11 -O3"),重新创建build和编译仍出现错误

@gaoxiang12
Copy link
Owner

解决了吗?

@RUNSONGchen
Copy link
Author

RUNSONGchen commented Oct 15, 2019 via email

@bittergourd1224
Copy link

我遇到了一样的问题,参考你的思路搜索了一下,我这边可以解决了。我是在CMAKESETListe.txt添加了:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

@bittergourd1224
Copy link

我这个方法到CH4中又不管用了,目前还没找到解决的办法

@dwindy
Copy link

dwindy commented Oct 30, 2019

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

thanks

@bittergourd1224
Copy link

我这个方法到CH4中又不管用了,目前还没找到解决的办法

最近终于解决了这个,但因为尝试的方法太多,已经不确定究竟哪步起了作用。主要建议有:

  1. sophus版本尽量与作者的一致。因为现在的sophus编译时要求eigen3在3.3版本以上,可能会出现问题。
  2. 在CMAKESETListe.txt添加 set(CMAKE_CXX_FLAGS "-std=c++11 -O2")

@lldavuull
Copy link

lldavuull commented Dec 22, 2019

謝謝樓上,在 CMAKESETListe.txt添加 set(CMAKE_CXX_FLAGS "-std=c++11 -O2") 後
解決了編譯ch3/examples的問題。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants