Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

Odd NIOS C++ compiler behaviour

corestar
New Contributor I
495 Views

I'm using Quartus 18.0 Std and the NIOS SBT for eclipse. I have a header file called util.hpp which should be treated as C++. But all C++ code in the header is flagged as a compiler error as in cpp_error1.jpg.

I decided to add an #ifdef __cplusplus fully expecting that section of code to gray out. Instead it now compiles as in cpp_error2.jpg.

I'm not sure what is going on here. The #ifdef seems to be causing to compile as C++ instead of just checking if it is C++.

Note, C++ code in a .cpp file in the same project compiles just fine. Also, showing the properties of the util.hpp shows it to be C++.

 

0 Kudos
1 Reply
EricMunYew_C_Intel
Moderator
474 Views

Hi, David


you can try enable_c_plus_plus in BSP under Main->Advanced.


0 Kudos
Reply