This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to compile C++ applications with eCos


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]