Unable to use C++11 in Nios II
Hi,
I have been recently facing a problem which is I couldn't compile my program using c++ libraries in a nios2 application project. My gnu's version is 5.3.0. Also, I did research about it and found out that it supports c++11. I also checked inclusion of headers and found out that project>includes>C:/intelFPGA/18.1/nios2eds/bin/gnu/nios2-elf/include/c++/5.3.0 path that contains the headers I want to use is also included. In a simple code like;
#include <chrono>
#include <mutex>
int main()
{
std::mutex mtx;
return 0;
}
it says mutex is not a member of "std"
***
#include <chrono>
#include <thread>
int main()
{
std::this_thread::sleep_for(std::chrono::seconds(3));
return 0;
}
it says std::this_thread has not been declared and so on.
I got into the headers by ctrl+left click and there is an if check
#if __cplusplus < 201103L
#include <bits/c++0x_warning.h>
#else
....
here it thinks its cpp version is below c++11 beacuse it shows #else scope as black.
However, in makefile of the nios2 application project I added ALT_CXXFLAGS := -std=c++11 and APP_CFLAGS_USER_FLAGS := -std=c++11
I don't understand the problem could you please help me about that.
Best Regards,
Balerion