samedi 31 décembre 2016

mingw32-g++: 'std::tr1' has not been declared

I'm facing this issue using Code::Blocks 16.01, everything works perfectly in Visual Studio 2015. The compiler option "Have g++ follow the C++11 ISO C++ language standard [-std=c++11]" is enabled, and the build log is:

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;

followed by lots of other errors, all related to the missing std::tr1 library. (I've replaced some paths and files with placeholders for privacy)

What am I missing in the compiler configuration?enter image description here

Aucun commentaire:

Enregistrer un commentaire