This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
How to compile C++ applications with eCos
- From: "Eric Castle" <ecastle at umich dot edu>
- To: <ecos-discuss at sources dot redhat dot com>
- Cc: "Maxwell Hunter" <mhunter at umich dot edu>
- Date: Fri, 18 Jun 2004 18:50:08 -0400
- Subject: [ECOS] 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