转载自:http://tb-nguyen.blogspot.com/2009/11/how-to-install-and-compile-bullet.html
How to install and compile Bullet Physics SDK on Ubuntu Linux
I’ve been wanting to improve how my simulation looks. I’ve also been wanting to integrate a scene graph to improve performance and physics to improve realism.
In regards to looks, I want something that is clean, simple and professional. For example, I like how the Bullet Physics SDK demos look.
I also like how the AI Sandbox looks.
To that end I decided to build from the Bullet Physics SDK sample applications.
——————————————————————————–
Update your list of applications.
$ sudo apt-get update
——————————————————————————–
Get CMake.
$ sudo apt-get cmake
——————————————————————————–
Get CMake to create Makefiles for you.
$ cmake -G "Unix Makefiles"
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
OPENGL FOUND
/usr/lib/libGLU.so/usr/lib/libGL.so-lSM-lICE/usr/lib/libX11.so/usr/lib/libXext.so
CMake Error: This project requires some variables to be set,
and cmake can not find them.
Please set the following variables:
GLUT_INCLUDE_DIR (ADVANCED)
GLUT_glut_LIBRARY (ADVANCED)
— Configuring done
My system did not have GLUT so CMake could not create Makefiles for me.
——————————————————————————–
Get GLUT.
$ sudo apt-get install freeglut3-dev
——————————————————————————–
Get CMake to create Makefiles for you.
$ cmake -G "Unix Makefiles"
OPENGL FOUND
/usr/lib/libGLU.so/usr/lib/libGL.so-lSM-lICE/usr/lib/libX11.so/usr/lib/libXext.so
GLUT FOUND
/usr/lib/libglut.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/binh/Desktop/bullet-2.75
——————————————————————————–
I don’t know what this does but you’ll need to do this step.
$ ./autogen.sh
——————————————————————————–
Configure your Makefiles.
$ ./configure
——————————————————————————–
Build Bullet Physis SDK and the Demos.
$ make
——————————————————————————-