How To: Build OpenKinect/LibFreenect in Linux
r3dux | November 18, 2010The Kinect just came out in Australia today, so I’m already a little bit late to the party, but I’m keen to see what I can do with it so I went and picked one up earlier – a couple of minutes after unboxing and it’s happily working with Linux. Awesome =D

The GLView example running on LibFreenect
Anyways, here’s what you need to do to build the library for yourself:
- Using synaptic or apt-get, install the following packages: libusb1.0-dev, freeglut3-dev, git, cmake
sudo apt-get install libusb1.0-dev freeglut3-dev git cmake
- Download the libFreenect source code using git (this will make a directory for you called libfreenect):
git clone https://github.com/OpenKinect/libfreenect.git
- Make a directory inside the c folder where you’ve downloaded the libFreenect source code and use cmake to configure the build:
cd libfreenect/c mkdir build cd build cmake ..
- Actually compile the library:
make
It’s possible you may need to install some other packages as well depending on what you currently have or don’t have installed, but if you need anything additional then cmake will let you know about it when you get to that step.
That’s it – you’re done!
Now you can check out what the kinect’s seeing by going into the examples directory (which will now exist at ~/libfreenect/build/examples) and running ./glview as root:
cd examples sudo ./glview |
I think we’re going to have a lot of fun with this… =D











