This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

undefined references?


I'm trying to compile some test code with newlib.  I did a unified
build of newlib,gcc,gas, and ld. Apparently my linker isn't finding
symbols in my newlib libraries.  Anyone have any idea whats happening
here?  Thanks.

- Nick

test.c:
-------
#include <math.h>
#include <string.h>

static void _main (void) {
  double d;

  d  = cosh(20.0);

}

[nick@noop lib]$ m68k-coff-nm libm.a |grep cosh
w_cosh.o:
         U __ieee754_cosh
00000006 T cosh


[nick@noop test2]$ make 
m68k-coff-ld --verbose -lm -lc -T./ram.ld crt0.o test.o -o main
GNU ld version 2.11.90 (with BFD 2.11.90)
  Supported emulations:
   m68kcoff
opened script file ./ram.ld
attempt to open /usr/local/m68k-coff/m68k-coff/lib/libm.a succeeded
attempt to open /usr/local/m68k-coff/m68k-coff/lib/libc.a succeeded
attempt to open crt0.o succeeded
crt0.o
attempt to open test.o succeeded
test.o
test.o: In function `_main':
/home/nick/build/test2/test.c:17: undefined reference to `cosh'
make: *** [main] Error 1



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]