irrBullet compilation error

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Soranne
Posts: 7
Joined: Thu Sep 30, 2010 10:17 am

irrBullet compilation error

Post by Soranne »

Hello everyone,
I have been trying to compile an irrbullet project for more than 2 hours but with no success :(

I'm using the helloworld project of irrlicht by just adding

Code: Select all

#include <irrBullet.h>
at the top.

Using this compile line :

Code: Select all

g++ -o "D:\Mes Documents\Ronan\pocketcpp\pocketcpp\QuickStart" "D:\Mes Documents\Ronan\pocketcpp\pocketcpp\QuickStart.cpp" -LC:\irrBulletSDK-0.1.8\lib\win32_gcc -LC:\irrBulletSDK-0.1.8\lib\win32_gcc\Release -IC:\irrBulletSDK-0.1.8\ -lirrlicht -lirrBullet -lBulletDynamics -lBulletSoftBody -lLinearMath -lBulletCollision -IC:\irrBulletSDK-0.1.8\source -IC:\irrBulletSDK-0.1.8\source\bheaders -IC:\irrBulletSDK-0.1.8\source\bheaders\Bullet -IC:\irrBulletSDK-0.1.8\ 
Unfortunately I have the following errors :

Code: Select all

C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btTypedConstraint.o):btT
ypedConstraint.cpp:(.text+0x408): undefined reference to `__gxx_personality_sj0'
 
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btTypedConstraint.o):btT
ypedConstraint.cpp:(.text+0x41e): undefined reference to `_Unwind_SjLj_Register'
 
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btTypedConstraint.o):btT
ypedConstraint.cpp:(.text+0x48a): undefined reference to `_Unwind_SjLj_Unregiste
r'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btTypedConstraint.o):btT
ypedConstraint.cpp:(.text+0x4d1): undefined reference to `_Unwind_SjLj_Resume'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x26c2): undefined reference to `__gxx_personality_sj0'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2708): undefined reference to `_Unwind_SjLj_Register'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2865): undefined reference to `_Unwind_SjLj_Unregister'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2908): undefined reference to `_Unwind_SjLj_Resume'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x295f): undefined reference to `__gxx_personality_sj0'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2998): undefined reference to `_Unwind_SjLj_Register'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2af5): undefined reference to `_Unwind_SjLj_Unregister'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2b98): undefined reference to `_Unwind_SjLj_Resume'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2be5): undefined reference to `__gxx_personality_sj0'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2c04): undefined reference to `_Unwind_SjLj_Register'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2c77): undefined reference to `_Unwind_SjLj_Unregister'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2cf1): undefined reference to `_Unwind_SjLj_Resume'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2d35): undefined reference to `__gxx_personality_sj0'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2d54): undefined reference to `_Unwind_SjLj_Register'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2dc7): undefined reference to `_Unwind_SjLj_Unregister'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text+0x2e41): undefined reference to `_Unwind_SjLj_Resume'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD0Ev[btRigidBody::~btRigidBody()]+0x15): undefined
 reference to `__gxx_personality_sj0'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD0Ev[btRigidBody::~btRigidBody()]+0x34): undefined
 reference to `_Unwind_SjLj_Register'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD0Ev[btRigidBody::~btRigidBody()]+0xaf): undefined
 reference to `_Unwind_SjLj_Unregister'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD0Ev[btRigidBody::~btRigidBody()]+0xf5): undefined
 reference to `_Unwind_SjLj_Resume'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD1Ev[btRigidBody::~btRigidBody()]+0x15): undefined
 reference to `__gxx_personality_sj0'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD1Ev[btRigidBody::~btRigidBody()]+0x34): undefined
 reference to `_Unwind_SjLj_Register'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD1Ev[btRigidBody::~btRigidBody()]+0xa4): undefined
 reference to `_Unwind_SjLj_Unregister'
C:\irrBulletSDK-0.1.8\lib\win32_gcc/libBulletDynamics.a(btRigidBody.o):btRigidBo
dy.cpp:(.text$_ZN11btRigidBodyD1Ev[btRigidBody::~btRigidBody()]+0xea): undefined
 reference to `_Unwind_SjLj_Resume'
collect2: ld returned 1 exit status
 
 
What is wrong?

Thank you for your help.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: irrBullet compilation error

Post by smso »

Try re-building (re-compiling) the bullet library and THEN the irrbullet library before compiling your irrbullet project.

Regards,
smso
Soranne
Posts: 7
Joined: Thu Sep 30, 2010 10:17 am

Re: irrBullet compilation error

Post by Soranne »

Thank you for your answer, unfortunately I don't know know to compile a library. I have tried to look in the readme.txt but it's for linux.
How do I do it for windows using g++?

I have tried to compile my project with irrBullet 1.71, but I have the same kinds of errors.


Regards,
Soranne
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: irrBullet compilation error

Post by jorgerosa »

smso wrote:Try re-building (re-compiling) the bullet library and THEN the irrbullet library before compiling your irrbullet project.
I have same issue here, (I think its a MinGW (GCCs) versions issue), followed also same steps as described, but the errors keep the same.
Anyone has a workaround for this? (If i find a solution I´ll post it here)

EDIT #1: What I´ve found on the web:
The newer series of MinGW released GCC does not use sjlj for C++ anymore.
"C:\MinGW\lib/libstdc++.a" is from the previous GCC install, you should do a CLEAN install of MinGW and remember to recompile all your C++ code with the new GCC to allow it to link properly.
Ok, here I go again... I´ll post later the results...

EDIT #2: Working solution:
(I´m using lattest versions of ALL libraries: MinGW (gcc 4.7.2, g++ 4.7.2)+ Irrlicht 1.8 + Bullet 2.81 + irrBullet 0.1.8... But with the same tired old user...)

--- BASE OF EVERYTHING ---
1) installed lattest MinGW version (at C:\MinGW)
2) in Code::Blocks, go to --> Settings --> Compiler --> Toolshain executables (edit this way:)
Compiler´s installation directory: C:\MinGW
C compiler: mingw32-gcc-4.7.2.exe
C++ compiler: mingw32-g++-4.7.2.exe
Linker for dynamic libs: mingw32-g++-4.7.2.exe

--- OUR PROJECT STUFF ---
3) Compile Irrlicht (Irrlicht includes a Code::Blocks file, located at "(...)irrlicht-1.8\source\Irrlicht\Irrlicht-gcc.cbp")
4) Compile IrrBullet (IrrBullet includes a Code::Blocks file, located at "(...)irrBullet_v.0.1.71\source\irrBullet.cbp")
5) Open your project
6) Link these libs to your project
7) Re-compile it ("2 blue circular arrows" button)
8) Run it
Last edited by jorgerosa on Sun Nov 25, 2012 1:48 am, edited 8 times in total.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: irrBullet compilation error

Post by sudi »

Make sure you downloaded the correct bulletversion.
Make sure you compile both irrBullet and your project with the same bullet headers and the matching bulletlibs.
Make sure you use the same irrlicht headers for irrBullet and your project.

And most importantly compile everything with the same gcc version
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Post Reply