Problems linking to calloc

Mark Mussetter mark at link-comm.com
Thu Jan 8 20:37:13 UTC 2004


Hi everyone,

I am running rtems-4.6.0pre5 on a motorola 5272.  I am also going to run 
Microwindows on top of rtems.  I can get a clean build of Microwindows for 
rtems, but if I try to build any demos, I get errors from the linker saying 
that it can't find calloc, rtems_semaphore_obtain, and others.  We do have 
the code for these functions in the rtems tree, but they aren't getting 
linked in for some reason.

Is there a library that needs to be linked in that we are missing?

Below is a clip from the build log:
<SNIP>

/opt/rtems-4.6/bin/m68k-rtems-gcc   -I. 
-I/microwindows/microwindows-0.90-rtems/src/include 
-I/usr/include/freetype2  -L/microwindows/microwindows-0.90-rtems/src/lib 
nxscribble.o scribwidget.o hre_api.o li_recognizer.o bitvector.o matrix.o 
sc.o util.o -o /microwindows/microwindows-0.90-rtems/src/bin/nxscribble 
/microwindows/microwindows-0.90-rtems/src/lib/libnano-X.a 
/microwindows/microwindows-0.90-rtems/src/lib/libmwengine.a 
/microwindows/microwindows-0.90-rtems/src/lib/libmwdrivers.a 
/microwindows/microwindows-0.90-rtems/src/lib/libmwfonts.a 
/usr/lib/libfreetype.a -lm

/opt/rtems-4.6/lib/gcc-lib/m68k-rtems/3.2.3/../../../../m68k-rtems/bin/ld: 
warning: cannot find entry symbol _start; defaulting to 80000074

/microwindows/microwindows-0.90-rtems/src/lib/libnano-X.a(nxutil.o): In 
function `GrNewBitmapFromPixmap':
nxutil.o(.text+0x516): undefined reference to `calloc'

/microwindows/microwindows-0.90-rtems/src/lib/libnano-X.a(srvmain.o): In 
function `GsAcceptClientFd':
srvmain.o(.text+0x22): undefined reference to `close'

/microwindows/microwindows-0.90-rtems/src/lib/libnano-X.a(srvmain.o): In 
function `GrOpen':
srvmain.o(.text+0xc6): undefined reference to `rtems_semaphore_obtain'
srvmain.o(.text+0xf0): undefined reference to `rtems_semaphore_release'
srvmain.o(.text+0x11c): undefined reference to `rtems_semaphore_release'

and on and on and on......
<END SNIP>

Thanks for any help you might provide,

Mark




More information about the users mailing list