Building on Linux - Strange Link Error

Mind Calamity
Posts: 13
Joined: Tue Feb 28, 2012 7:51 am

Building on Linux - Strange Link Error

Post by Mind Calamity »

Hello, Bullet community, so I just compiled Bullet on Linux using G++ 7.3.1 and now when trying to link my engine, which is a single shared library right now I get the following error:

Code: Select all

/usr/bin/ld: <full-path>/libBulletCollision.a(btAxisSweep3.o): relocation R_X86_64_32S against `_ZTV20btAxisSweep3InternalItE' can not be used when making a shared object; recompile with -fPIC
<full-path>/libBulletCollision.a: could not read symbols: Bad value
Any quick help is much appreciated. :)
Ateocinico
Posts: 12
Joined: Sat Jun 29, 2013 5:55 pm

Re: Building on Linux - Strange Link Error

Post by Ateocinico »

Invoke cmake with -DBUILD_SHARED_LIBS=ON in the command line.
That creates a Makefile for building a set dynamic bullet libraries.
That information is already in the INSTALL file.