Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Compile C++ for NIOS2 in Linux

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?

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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