Forum Discussion
Altera_Forum
Honored Contributor
12 years agoC++ 11
Hi, Has anybody used c++ 11 with Nios? By reading the release notes from quartus 13.1, it seems like gcc was upgraded to v4.7.3, which would include support for c++ 11. Now when I try to use so...
Altera_Forum
Honored Contributor
12 years agoHi,
we're currently going down the same road. By gcc - v you are refering to your host system. Instead you have to call: nios2-elf-gcc -v There you should get this: gcc version 4.7.3 (Altera 13.1 Build 162) Where currently also experimenting in exploring the c++ capabilities/support of the Nios. Yesterday we tried to use std::chrono but somehow it seems that the _GLIBCXX_USE_C99_STDINT_TR1 define is not set. Also we checked for the libstdc++.a and its contents and it seems like many of the constructs are not included. The problem might be that many C++11 constructs require a underlying OS - like std::thread for example. Sry for hijacking this thread, but I was about to open a thread on this issue myself. So here go some questions: Could somebody please give any indication on the include strucutre regarding the different directories (nios2-elf and H-i686-pc-linux-gnu)? How is the -std=c++11 flag set using the create-this_bsp/create-this-app script (at the moment we did this manually compiling the application)? Are there any experiences around regarding the limits of C++ and especially C++11 on the Nios? Thanks in advance! Regards!