I need to use the C++ osmium library and I program using Eclipse cdt. To be sure my system is well configured, I managed to compile and link few of the examples by hand using the installed gcc 4.8.2 that is enough according to osmium documentation.
Osmium uses C++11 and it seems my Eclipse has a problem understanding it. I followed the instruction in the not-really-duplicate answer, but does not help.
I added -std=c++11
to the project properties under C++ Build -> Settings -> C++ compiler -> Miscellaneous
and under C++ Build -> Discovery Options
.
I also tried adding the macro __GXX_EXPERIMENTAL_CXX0X__
.
Strangely in my main file it seems the C++11 features are working, for example I can write
for (auto a : {1,2,3,4,5}) {}
but the osmium directory I copied in the project instead results filled of errors. It is not a missing include directory since the lines #include <osmium/so/and/so>
show no errors.
Similarly, std::move
even after including utility
, gives the cannot be resolved error.
However, I noticed that the code actually builds, even if Eclipse shows multiple errors around the code.
I stuck, what can I do to set up Eclipse?