[uClinux-dev] How to compile a c++ program for uclinux/coldfire

Michael Caisse mcaisse at allweatherinc.com
Mon Mar 24 11:58:51 EST 2003

Umberto -

The easiest way to deal with c++ is to let the m68k-elf-g++ wrapper take 
care of it all. Use it for calling the linker also. The following 
command will get you further:

	m68k-elf-g++ -m5307 -Wl,-elf2flt  -o foo foo.cc -lstdc++ -lc -lgcc

I'm using a 5307, you will need to replace the -m5307 with your flavor. If you are building within the distribution, make sure that LIBS and LDFLAGS have been set correctly and using the uClinux-dist uClibc.

michael caisse

Umberto Giacobbi wrote:

> Hi guys, I'm a newbie of embedded development and I got big (for me) 
> problem with the compilation of a simple c++ program (junst a test) 
> that use iostream and string. My problem is what command line options 
> I must use for compile my program I search in the m68k-elf-g++ man 
> page but I can't find a good example. And later how i must use 
> elft2flt and the liker? Can you give me some examples of a typical 
> command line for g++ ld and so on? Or you can tell me where i can find 
> more information (how to tutorials and so on) about compiling c/c++ 
> programs for uclinux on a coldfire cpu.
> Thank you in advance.
> Umberto Giacobbi
> Pixelworks.it
> _________________________________________________________________
> MSN Foto: condividi, ritocca e stampa le tue foto online  
> http://photos.msn.it
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org

More information about the uClinux-dev mailing list