Problem linking

Discuss any Chipmunk bugs here.
Post Reply
Maxxi
Posts: 1
Joined: Sat Dec 10, 2011 3:40 pm
Contact:

Problem linking

Post by Maxxi »

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?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Problem linking

Post by slembcke »

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/
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests