* [ECOS] How to compile C++ applications with eCos
@ 2004-06-18 22:50 Eric Castle
0 siblings, 0 replies; 2+ messages in thread
From: Eric Castle @ 2004-06-18 22:50 UTC (permalink / raw)
To: ecos-discuss; +Cc: Maxwell Hunter
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] How to compile C++ applications with eCos
[not found] <E1BbSBe-000482-00@londo.lunn.ch>
@ 2004-06-19 13:59 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2004-06-19 13:59 UTC (permalink / raw)
To: Eric Castle; +Cc: ecos-discuss, Maxwell Hunter
On Fri, Jun 18, 2004 at 06:50:08PM -0400, Eric Castle wrote:
>
> 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
*-gcc is just a wrapper which calls the correct compile for the
language indicated by the extension. ie if the extension is .c it will
call the c compiler, if its .cxx it will call the c++ compiler, if its
.f it will call the fortran compiler if it was available when gcc was
compiled etc.
So use the same command line, it should work.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-19 13:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-18 22:50 [ECOS] How to compile C++ applications with eCos Eric Castle
[not found] <E1BbSBe-000482-00@londo.lunn.ch>
2004-06-19 13:59 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).