error compiling

rogerdv

03-08-2011 14:38:08

I installed Ubuntu 11.04 a few weeks ago and now Im trying to do some OgreBullet tests, but I find that I get this error:

/usr/bin/ld: /usr/local/lib/libBulletCollision.a(btAxisSweep3.o): relocation R_X86_64_32S against `vtable for btAxisSweep3Internal<unsigned short>' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libBulletCollision.a: could not read symbols: Bad value
collect2: ld returned 1 exit status


First I thought that OgreBullet wasnt compatible with Bullet 2.77, but after carefully looking at the error, I think thats not the case. any idea about how to solve this?

dermont

03-08-2011 17:32:34

I installed Ubuntu 11.04 a few weeks ago and now Im trying to do some OgreBullet tests, but I find that I get this error:

/usr/bin/ld: /usr/local/lib/libBulletCollision.a(btAxisSweep3.o): relocation R_X86_64_32S against `vtable for btAxisSweep3Internal<unsigned short>' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libBulletCollision.a: could not read symbols: Bad value
collect2: ld returned 1 exit status


First I thought that OgreBullet wasnt compatible with Bullet 2.77, but after carefully looking at the error, I think thats not the case. any idea about how to solve this?


You probably need to build bullet with fpic (CMAKE_CXX_FLAGS=-fPIC or add_definitions(-fPIC) ) - better to ask on the bullet forums:

http://bulletphysics.org/Bullet/phpBB3/ ... php?t=6448
http://bulletphysics.org/Bullet/phpBB3/ ... php?t=5250

rogerdv

03-08-2011 17:55:10

Thanks! That solved the problem.
By the way, seems that bullet site is unreachable from my country, thats why I cant search their forums.