Altera_Forum
Honored Contributor
22 years agoC++ on Microtronix uClinux distribution
I have purchased uClinux from Microtronix for the nios2. It's up and running and I can build C applications and run them on a Cyclone board. I have not been able to build a clean C++ hello world program:
# include "iostream" using namespace std; int main() { cout << "Hello World"; } Microtronix supplies header files and libraries to be used in place of those supplied by Altera. For C, this works fine. When I attempt to build the above, I get "undefined reference to `_impure_ptr' " which looks like a mismatch between the Altera header files that# include "iostream" pulls in and the libraries from Microtronix. The command under Cygwin: nios2-elf-g++ -msys-crt0=C:/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_0.1.0/lib/crt0.o -r -LC :/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_0.1.0/lib -lstdc++ -lgcc -lc -o hello.bin helloCpp.cpp Has anyone had success with C++ on the Microtronix nios2 uClinux distribution? Thanks, Bruce