How to make the Bullet lib using GCC Code::Blocks

Post Reply
Lil_Margin
Posts: 10
Joined: Sun Jul 19, 2009 5:24 am

How to make the Bullet lib using GCC Code::Blocks

Post by Lil_Margin »

PS : i try to use as much images as possible so the newcomer can understand better what i am doing.
We all know that Bullet doesn't come with precompiled libs so we need to make them ourselves :)
First step is to download Bullet Physics Library from http://code.google.com/p/bullet/downloads/list

Image

after you downloaded it you extract it to the place you want(if you download the .zip version)
and then we open GCC Code::Blocks and go to "file->new->project" and a pop up opes and we choose "Static library"

Image
Image


and then put the project title you want and folder you want it to be in(you know like you do with other projects)

the "Static Library" crates a main.c...remove that file
Image

and then right click on the project name and choose "add files recursively" and then choose the "src" folder inside the bullet folder(the folder you extracted bullet in)
Image
click OK and click "select all" and click OK

if everything looks like this then your on the good path
http://img193.imageshack.us/img193/1712/34978529.png


then right click on the project name and choose "build options" and a pop up should appear
Image
then go to the search directories and add the bullet "src" folder and the "Bullet\src\BulletMultiThreaded\vectormath\scalar\cpp" folder
then click build and it should build successfully.
go to the folder you have your project in and you should get a ".a" file..that's the bullet lib...


This tutorial has been written by Lil_Margin and if its good enough i would like if it could be added to the Bullet wiki so i can contribute to bullet wiki :)
Have a good day ladies and Gentleman.
Fleve
Posts: 2
Joined: Sun Sep 26, 2010 7:59 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by Fleve »

Hi,

Thank you so much for the tutorial but actually I am stuck in the last point.

When I am compiling I get several error messages starting from:

crtdbg.h: not such file or directory...

Do I need to download those libraries manually?
Empire-Phoenix
Posts: 24
Joined: Sat Nov 07, 2009 7:57 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by Empire-Phoenix »

A bit late, but I found a solution to this one, the file in question is a memory leak check stuff from microsoft.

Either you install their Visual C++ sdk, or you just remove the import done.
(Just thought I would leave this for others after me)

Ironic sidenote:
PpuAddressSpace.h|23|warning: ignoring #pragma warning

(It's warning me that it#s ignoring the pragma to ignore warnings ^^)
nspc
Posts: 1
Joined: Fri Dec 10, 2010 7:26 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by nspc »

I have tried it, but i have this error :
D:\programmes\libs\bullet\monprojet\src\BulletMultiThreaded\GpuSoftBodySolvers\DX11\btSoftBodySolverVertexBuffer_DX11.h|24|error:
d3d11.h: No such file or directory
What I have to do?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: How to make the Bullet lib using GCC Code::Blocks

Post by Erwin Coumans »

nspc wrote:I have tried it, but i have this error :
D:\programmes\libs\bullet\monprojet\src\BulletMultiThreaded\GpuSoftBodySolvers\DX11\btSoftBodySolverVertexBuffer_DX11.h|24|error:
d3d11.h: No such file or directory
What I have to do?
You don't need to add files from the Bullet/src/BulletMultiThreaded or Bullet/src/MiniCL directory. Just remove them from your project.

Thanks,
Erwin
shotoreaper
Posts: 2
Joined: Sun Dec 30, 2012 2:24 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by shotoreaper »

Hi!
I follow your tutorial and i get the library file perfectly. But when I link the library to my project and I add #include "btBulletDynamicsCommon.h", when I build I get this error:

Code: Select all

fatal error: btBulletDynamicsCommon.h: No such file or directory
Do you know your why this happens?
CHAOS-THEORY
Posts: 9
Joined: Fri Jan 25, 2013 1:46 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by CHAOS-THEORY »

shotoreaper wrote:Hi!
I follow your tutorial and i get the library file perfectly. But when I link the library to my project and I add #include "btBulletDynamicsCommon.h", when I build I get this error:

Code: Select all

fatal error: btBulletDynamicsCommon.h: No such file or directory
Do you know your why this happens?
Then you didnt link'd em' correctly.

> add ur bullet SRC folder to search directories -> in CODE::GLOCKS, i guess ur using it right,?


=> AK'
Gardian
Posts: 1
Joined: Mon Jan 27, 2014 5:29 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by Gardian »

None of the #include <whatever.h>'s are working besides <windows.h>, first it said
Fleve wrote:crtdbg.h no such file...
so i deleted it and it said that the next one wan't there. Now i know you said,
Empire-Phoenix wrote:...Either you install their Visual C++ sdk...
but can you post a download link and some instructions on what to do? i am brand new to Bullet and i'm trying to make a game, and still trying to find a Programming in C++ with Bullet tutorial.
also who's visual C++ sdk

EDIT: i looked up Visual C++ SDK and i'm downloading "Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1" from microsoft. i hope thats it.
EDIT: nope, i'm going to try to look up the actual .h files i need

Thank you.
AngelGM
Posts: 12
Joined: Mon Oct 28, 2013 2:40 pm

Re: How to make the Bullet lib using GCC Code::Blocks

Post by AngelGM »

The same problem here.

I am using: Ubuntu, Bullet 2.82, codeblocks 10.05.

When I build the project in c::b it shows the same error pointed out before: "windows.h: no such file or directory" (in the same file)
I wonder if appart from the /src folder I have to add something else to c::b

Any ideas, please say!

A
Post Reply