You are not logged in.
Hi,
I'm currently trying to write a simple program in C for converting astronomy coordinates. But during the compile time ld allways returns:
time.o(.text+0x963): In function `julian_date':
/home/user/astro/time.c:269: undefined reference to `floorf'
time.o(.text+0x980):/home/user/astro/time.c:269: undefined reference to `floor'
collect2: ld returned 1 exit status
if I'm using floor() or any other function from <math.h> listed here. ld also can't find ceil() , floorf() and so on.
I've tried to repacman my glic, but without any result. ld returns the same error. Currenty I have glibc-2.3.2-3 installed.
Thanks
I'll sleep when I'm dead
PGP pubkey on keyserver.net
Offline
Floor is in the libm library so you need to add the link option -lm to your gcc command.
Offline
Thanks
I'll sleep when I'm dead
PGP pubkey on keyserver.net
Offline