[ECOS] How to compile C++ applications with eCos

Eric Castle ecastle@umich.edu
Fri Jun 18 22:50:00 GMT 2004


Hi everyone,

Currently I'm successfully compiling C programs for our Axiom board.  Here's
a sample compile line:

powerpc-eabi-gcc -g -I ../ecosMod060904/ecos_install/include/ start.c
alarms.c experiment.c i2c.c housekeeping.c flash.c -L
../ecosMod060904/ecos_install/lib/ -Ttarget.ld -nostdlib -o start

My program works just fine this way when I run it via gdb like this:

powerpc-eabi-gdb -nw start

(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
(gdb) load
(gdb) continue

And this works fine with my program and the sample programs.

However, if I switch it to using powerpc-eabi-g++ and alter the file
extensions from .c to .cpp, then nothing works.  I'm under the impression
after searching this list and such that C++ should work with eCos.  Is there
a different compile line and options that I need to use for this?  Does my
actual eCos library need to have some options enabled?

Thanks,

-Eric Castle

C&DH - FEGI
University of Michigan







-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list