4.6pre1 Makefile link libraries
Wendell Thompson
wthompson at dsg-test.com
Wed Mar 5 20:04:31 UTC 2003
Ralf Corsepius wrote:
> Am Die, 2003-03-04 um 23.08 schrieb Wendell Thompson:
>
>>gregory.menke at gsfc.nasa.gov wrote:
>>
>>>Wendell Thompson writes:
>>> > For a C++ application with 4.6.0pre1, which link libraries need to be
>>> > listed in the Makefile?
>>> >
>>> > The linker is complaining about even the C++ basics- operator new,
>>> > operator delete, etc. Amongst other things.
>>> >
>>
>
> This indicates one of these
>
> * not using <target>-rtems-g++ to link.
> * not using make-cxx-exe to build the download-images
> * not having a make-cxx-exe in your <bsp>.cfg
>
All of these were the case. May I humbly suggest that templates for the
application makefile and <bsp>.cfg that have the pieces for C++
applications would be very beneficial. This is all different from the
earlier RTEMS versions.
On to the next problem. The linker insists on including dummy.o from
librtemscpu.a, even though the Init function is defined in the app files
(in init5206.c):
m68k-rtems-g++ -B/opt/rtems/m68k-rtems/clc5206_am/lib/ -specs bsp_specs
-qrtems -g -Wall -O4 -fomit-frame-pointer -g -gstabs+ -m5200
-DREV_B -DNUM_TL1_PORTS=3 -o o-optimize/rtems_demo.exe -Xlinker
-Map -Xlinker mapfile o-optimize/console.o o-optimize/init5206.o
o-optimize/Sys_Task.o o-optimize/Leds.o o-optimize/Dig_Io.o
o-optimize/Alarms.o o-optimize/Timer.o o-optimize/Ext_Ctrls.o
o-optimize/Bit_Map.o o-optimize/Switches.o o-optimize/Lib.o
o-optimize/Tl1_Port.o o-optimize/Port_Task.o o-optimize/Sio.o
o-optimize/Buffer.o o-optimize/Modem.o o-optimize/Lists.o
o-optimize/Message.o o-optimize/Am416Rtc.o o-optimize/SioRCF.o
o-optimize/ds1302.o o-optimize/Globals.o o-optimize/NVRam.o
o-optimize/tc58f400.o o-optimize/RTEMSTimer.o o-optimize/ModemMx614.o
o-optimize/HalfDup_Tl1.o o-optimize/init.o
/opt/rtems/m68k-rtems/clc5206_am/lib/no-dpmem.rel
/opt/rtems/m68k-rtems/clc5206_am/lib/no-mp.rel
/opt/rtems/m68k-rtems/clc5206_am/lib/no-part.rel
/opt/rtems/m68k-rtems/clc5206_am/lib/librtems++.a
/opt/rtems/m68k-rtems/clc5206_am/lib/librtemscpu.a(dummy.o): In function
`Init':
itimerspec/../../../../../../../cpukit/libmisc/dummy/dummy.c:150:
multiple definition of `Init'
o-optimize/init.o:/usr/local/projects/cf_am416_revb_rtems-4.6pre1/init.cpp:44:
first defined here
/opt/rtems/lib/gcc-lib/m68k-rtems/3.2.1/../../../../m68k-rtems/bin/ld:
Warning: size of symbol `Init' changed from 2942 to 2 in
/opt/rtems/m68k-rtems/clc5206_am/lib/librtemscpu.a(dummy.o)
/opt/rtems/m68k-rtems/clc5206_am/lib/librtemscpu.a(dummy.o)(.data+0x2c):
undefined reference to `main'
collect2: ld returned 1 exit status
More information about the users
mailing list