Closed lotusnowshen closed 9 years ago
不应该啊,你使用的是最新的代码吗?
我也是 ubuntu12.04
编译器是 gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
也使用了 -std=c++0x
也就是在 CMakeLists.txt 里面加了 ADD_DEFINITIONS(-O3 -Wall -g -std=c++0x)
编译没有任何问题啊。
你能贴一下更详细的报错吗
抱歉,错误无法还原了 最近尝试过好几次了,下次遇见再来贴一下吧。
问题出现在这里:
我使用的环境是ubuntu 12.04 LTS 编译器: gcc version 4.6.4
问题可能是#if(__cplusplus == 201103L)判断条件错误。 我采用的是-std=c++0x,于是代码中采用了TR1的版本,但是C++0x已经提供了unordered_map和unordered_set所以造成错误。