Problem building C++ Program

Till Straumann strauman at SLAC.Stanford.EDU
Mon Nov 11 17:57:43 UTC 2002


Dieter.B.Schaefer at t-online.de wrote:
> Hello all,
> I'm in the middle of porting RTEMS SS-20021007 to a PowerPC based board. So far, 
> things went quite successful. The included samples like hello.exe, ticker.exe, 
> cdtest.exe etc. work as expected.
> Now I have problems to get my own C++ programs build. I've started with Makefile.leaf 
> found in /opt/rtems/make/Template. It works ok for plain C programs, however it fails 
> to build C++ programs. (Looks like it doesn't link the proper libraries)
> Any suggestions what to add or modify?
> 
> Another question related to this template Makefile.leaf is how to generate a linker 
> map? The parameter "-Map Target.map" is either not passed to the linker, or not 
> recognized by gcc. All I could go to work was the "-M" option ... sending the linker map 
> to stdout.
> 

If you link using gcc (and not ld directly), the syntax is

-Wl,-Map,Target.map

(-Wl tells the driver to pass the attached options down to the linker; 
note the comma separating the argument from the -Map. No space must be
present.

HTH

-- Till

> Any help and suggestions are appreciated.
> 
> Thanks,
> Dieter
> 
> 






More information about the users mailing list