I need to use data structures, such as unordered_map, in my code in an NS-3 network simulator. To compile the source code, waf builder is used. I am confused that where should I add -std = c ++ 0x to be added to the compiler flags? I tried adding it to CXXFlags in the main wscript file using:
module.env.append_value('CXXFLAGS', '-std=c++0x');
But still I get this error:
This file requires compiler and library support for the upcoming ISO C ++, C ++ 0x standard. This support is currently experimental and should be included with the options -std = C ++ 0x or -std = gnu ++ 0x. C / C ++ Problem
Should I also add any library to my waf module?
PS: My version of GCC is 4.4
Update: after upgrading to 4.7, I get this error:
error:
Is there any way to tell the compiler to use 0x instead of 11?
source share