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++
12748 Discussions

Compile C++ for NIOS2 in Linux

Altera_Forum
Honored Contributor II
1,022 Views

I would like to compile C++ for Nios2 under Linux. 

 

I found gcc-nios2 and binutils-nios2 but it doesn't look like it handles C++ only C. 

 

Does anyone know if there a GNU version of something like nios2-elf-g++ ? 

 

When I try to compile a .cpp file I get this: 

$ nios2-elf-gcc numpty.cpp nios2-elf-gcc: numpty.cpp: C++ compiler not installed on this system 

 

Anyone having an idea?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
346 Views

Compiling .cpp files with nios2-elf-gcc works on my linux machine. There's a nios2-elf-c++ in the directory so I assume that's the C++ compiler portion of the GNU tools. Maybe it's something with your environment? I'm using a standard NIOS 5.1 Linux installation on Debian. The command line C++ compiler works in both the standard bash shell or in the sdk_shell 

 

Andrew
0 Kudos
Reply