Compiling LWJGL on Windows

The following tutorial assumes you have installed at least Windows 2000/XP. Compilation of LWJGL has not been confirmed on Windows 98/Me versions.

Installing Java and Java Build Environment

If you have already installed Java, please skip this part.
Please install the appropriate Java Development environment. Java 1.5+ is required to build, but Java 1.4+ is sufficient as a runtime environment. You can get Java here.

Please also install Ant and make sure it's on the path.

Installing Build Environment and Support libraries

Once the JDK and Ant has been installed, you will need to download and install the native libraries needed by LWJGL to compile the bindings.

Note: you may have to manually edit the platform_build/windows_ant/build.xml and modify the <property name=“alhome” location=“${program_files}\OpenAL 1.1 with EFX SDK”/> if it has changed name. Once the above applications have been installed, please modify your environment variables and add these two properties

  • DXSDK_DIR: Path to DirectX SDK installation (example: C:\Program Files\Microsoft DirectX SDK (August 2007))
  • ProgramFiles: Path to program files directory (example: C:\Program Files)

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

To generate the native parts, you need to open the 'Visual Studio Command Prompt', which was installed when you installed Visual Studio Express. This commandprompt have the needed compile time environment setup. Navigate to the LWJGL directory and issue a:

  1. ant compile_native

This should produce the lwjgl.dll binary in libs\win32\

Compiling Optional Modules

If you want to compile the optional parts, you will have to fix the fmod dependency by downloading the FMOD 3 Programmers API.

  1. extract fmod to a directory of your choice
  2. Edit your environment variables and add FMODHOME and set the value to the path of the directory you extracted fmod to (example: C:\Program Files\fmodapi375win)
  3. cd to the lwjgl directory
  4. do an 'ant compile_native_optional'

To test FMOD, please copy the fmod.dll to the libs\win32.

Building LWJGL and Win32 binaries using your IDE

Please make sure that you launch the IDE from the Visual Studio Command Prompt. Then just execute the compile_native ant target from your IDE.

 
lwjgl/tutorials/compilewin32.txt · Last modified: 2007/11/24 13:41 by matzon
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki