Login  Register

Re: gluegen - examples needed

Posted by peterk on Jul 21, 2014; 8:32pm
URL: https://forum.jogamp.org/gluegen-examples-needed-tp4031123p4032610.html

FYI - I just got a simple DLL plus Java main building and running like so many "start here" situations once people get beyond the initial hump they forget about it and move on which is why in so many OSS projects how to install and get the initial environment up is often the most thinly or inconveniently documented and most frustrating part of the experience.

Once I got the generator script working then I managed to figure out that you need to use the "jni.h" to compile it and it comes for the jdk distribution. The export flags etc are defined in there and for the current platform it is present in the ${JAVA_HOME}/include area and you also have to add the specific appropriate platform dependent directory, in my case win32 into the include path.

Also I notice that with JOGL a copy of jni.h is included in the distribution.  Knowing whether that is a special customized version or just a convenient copy is not in the docs either.

I was then able to build it all and run it.  But I will say something that would take an hour or so with a "hello world" script took me a day or so of annoyance and because of the inestimable nature of sussing out the unknown almost caused me to fall back to "SWIG" at the request of the project manager.  As a first encounter with a library not a good way to get it adopted :)

FYI though it was mentioned on StackOverflow that MSVC was not supported by gluegen I was able to build the DLL with both GCC and VC10 properly.  Whether all the data types are supported on both compilers not I'm sure but the generated code seems generic enough that some simple header munging  should make it relatively easy to support both.

PK