Linking C executable chipmunk_demos
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ../src/libchipmunk.a(cpVect.c.o): undefined reference to symbol 'sincos@@GLIBC_2.2.5'
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'sincos@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
/lib64/libm.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [Demo/chipmunk_demos] Error 1
make[1]: *** [Demo/CMakeFiles/chipmunk_demos.dir/all] Error 2
make: *** [all] Error 2
Any idea how to fix this?
Problem linking
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Problem linking
Like it says (very cryptically), it's not linking to the math library. Not sure why it wouldn't be by default like every other gcc setup. You'll have to add -lm to the linker options.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 2 guests