我使用Code :: Blocks 16.01来解决这个问题,一切都在Visual Studio 2015中完美运行。编译器选项"让g ++遵循C ++ 11 ISO C ++语言标准[-std = c ++ 11]"已启用,构建日志为:
mingw32-g++.exe -Weffc++ -std=c++11 -g -c "<path>\heuristic.cpp" -o .objs\heuristic.o
In file included from <path>\METSlib\metslib-0.5.3\metslib\mets.hh:129:0,
from <path>\Model.h:2,
from <path>\<file>,
from <path>\<file>:
<path>\METSlib\metslib-0.5.3\metslib\model.hh: In function 'void mets::random_shuffle(mets::permutation_problem&, random_generator&)':
<path>\METSlib\metslib-0.5.3\metslib\model.hh:252:10: error: 'std::tr1' has not been declared
std::tr1::uniform_int<size_t> unigen;
后面跟着很多其他错误,都与缺少的std :: tr1库有关。 (我已经用占位符替换了一些路径和文件以保护隐私)