Skip to content

Compiling JNAerator

Chris Welty edited this page May 31, 2020 · 4 revisions

To build JNAerator, run the following commands:

git clone git://github.com/nativelibs4java/JNAerator 
cd JNAerator
mvn clean install

You'll find jnaerator-{{version}}-shaded.jar in JNAerator/jnaerator/target.

When JNAerator is run it outputs a number of files so you'll want to create a directory to contain them:

mkdir output
java -jar jnaerator/target/jnaerator-{{0.13-SNAPSHOT}}-shaded.jar -library {{GL}} {{/usr/include/GL/gl.h}} -mode Directory -o output    

If you also wish to build BridJ, run the following from the nativelibs4java folder:

cd libraries/BridJ 
mvn clean install 
../scripts/listRuntime 
cd ../jnaerator 
mvn clean install

JNAerator is a moving target and some of its tests might be broken on some platforms. If that's the case, you can skip tests with -DskipTests in your Maven command line.

Clone this wiki locally