Compiling LWJGL on linux

The following tutorial assumes you have installed Debian Etch.

Installing Java

If you have already installed Java, please skip this part.
You will find Sun Java in the non-free repository, so you will have to update your apt-get source list.
Edit /etc/apt/sources.list, append 'contrib non-free' to deb locations
Then perform an 'apt-get update'. Once updated, install Java by issuing an 'apt-get install sun-java5-jdk'.

Installing Build Environment and Support libraries

  1. apt-get install build-essentials
  2. apt-get install xorg-dev
  3. apt-get install ant ant-optional
  4. apt-get install subversion

Compiling LWJGL

Before you can compile lwjgl, please check it out from SVN by issuing the following command: svn co https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib/trunk/LWJGL lwjgl

Then enter the lwjgl directory and issue the following commands:

  1. mkdir bin
  2. ant generate-all
  3. ant compile
  4. ant compile_native

Please note. If you are compiling on an 64bit platform, the compile scripts will generate a liblwjgl64.so otherwise a liblwjgl.so is produced

Compiling Optional Modules

If you want to compile the optional parts, you will have to fix the fmod dependency by downloading it from http://fmod.org.

  1. extract fmod to a directory of your choice
  2. export the path by issuing 'export FMOD=/path/to/fmod/directory'
  3. cd to the lwjgl directory
  4. do an 'ant compile_native_optional'

To test FMOD, please copy the libfmod-<version>.so to the lwjgl/libs/linux folder as libfmod.so

 
lwjgl/tutorials/compilelinux.txt · Last modified: 2007/10/21 20:31 by matzon
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki