forked from markwal/GPX
-
Notifications
You must be signed in to change notification settings - Fork 16
undefined reference to 'sqrt' #25
Copy link
Copy link
Open
Description
I am building on linux. It looks like there is a problem accessing the math libraries.
make --trace
Makefile:24: update target 'getopt.o' due to: getopt.c
cc -c -w getopt.c -o getopt.o
Makefile:24: update target 'gpx.o' due to: gpx.c
cc -c -w gpx.c -o gpx.o
Makefile:24: update target 'gpx-main.o' due to: gpx-main.c
cc -c -w gpx-main.c -o gpx-main.o
Makefile:20: update target 'gpx' due to: getopt.o gpx.o gpx-main.o
cc -lm getopt.o gpx.o gpx-main.o -o gpx
gpx.o: In function `magnitude':
gpx.c:(.text+0x1c4b): undefined reference to `sqrt'
gpx.o: In function `mm_to_steps':
gpx.c:(.text+0x2256): undefined reference to `round'
gpx.c:(.text+0x227d): undefined reference to `round'
gpx.c:(.text+0x22a4): undefined reference to `round'
gpx.c:(.text+0x22f4): undefined reference to `round'
gpx.c:(.text+0x2350): undefined reference to `round'
gpx.o:gpx.c:(.text+0x2390): more undefined references to `round' follow
collect2: error: ld returned 1 exit status
Makefile:20: recipe for target 'gpx' failed
make: *** [gpx] Error 1
here's my version
uname -a
Linux 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels