12-24-2018 12:28 AM
I have been trying to declare an unordered_map in my SDK C code, initially the header "map" was not included then i added the path of the header in the directories of my project, with the help of one of the forum links, after which the header was successfully included.
But even after including the header the declaration of unordered_map shows syntax error. I have attached the ss of a basic code to explain the situation.
Why is the syntax error present i am unable to understand can someone please help?
12-25-2018 12:29 AM
12-25-2018 08:05 AM - edited 12-26-2018 06:30 AM
HLS support is limited... it looks like c++11 is not fully there... using c++98 I can 'compile/resolve' a map (but not unorder_map; which would be c++11)
So, can you try 'map' (and the c++98 flag)
That being said, that 'may' not work either... As I understand it, a STL that requires dynamic allocation is not supported.
12-28-2018 12:28 AM
Hey thanks a lot!!
Including the flag -std=c++11 finally did work the warning were due some changes i made earlier.
03-19-2019 03:52 AM
To add the flag, select the project you are working on then go to project tab on the menu bar, followed by the following steps,
project --> properties --> C/C++ build --> Settings --> ARM v7 g++ compiler --> miscellaneous
After following these steps the following screen will appear. In the other flags you can add the flag -std=c++11.