error compiling

Anas Alzouhbi anas.lbn at gmail.com
Tue Apr 7 16:11:31 CEST 2009


I run successfully a program written in
http://www.enricozini.org/2008/tips/accelerometers.html
to read the Freerunner's accelerometers
but I did another program like the precedent, but I added  #include <math.h>
and in the void: void processInputEvents(FILE* in) I added only these lines:
x2 = pow (x,2);
y2 = pow (y,2);
dom = sqrt (x2 + y2);
and I compiled my program with toolchain, so I did this command: make
but I obtained an error message like I don't include math.h
the output was:
ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t
-std=gnu99 -I. -isystem/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/include
-Wall -pedantic -std=c99 -fexpensive-optimizations
-fomit-frame-pointer -frename-registers -Os -c -o inclinaison.o
inclinaison.c
inclinaison.c: In function ‘processInputEvents’:
inclinaison.c:11: warning: unused variable ‘inclinaison’
arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -std=gnu99
-Wall -pedantic -std=c99 -fexpensive-optimizations
-fomit-frame-pointer -frename-registers -Os
-L/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib -o
inclinaison inclinaison.o
inclinaison.o: In function `processInputEvents':
inclinaison.c:(.text+0x128): undefined reference to `sqrt'
collect2: ld returned 1 exit status
make: *** [all] Error 1

what could be the reason?? and what should I do??




More information about the community mailing list