Re: gluegen - examples needed
Posted by peterk on Jul 21, 2014; 10:09pm
URL: https://forum.jogamp.org/gluegen-examples-needed-tp4031123p4032613.html
I posted the sample script bugs to bugzilla.
Like many of these "get the first build going" it was actually almost brain dead simple - once you know it. The thing is when you don't know it it can be hard to guess and find information and thus frustrating.
1st I got the generator script in the doc/manual/expample1/gen.sh to work by fixing it as stated above.
Then I tried to compile the code by putting the source files into a basic build script that builds a DLL.
I searched my machine for instances of "jni.h" because I know if you were building it for jogl it had to be there somewhere. I found two copies one in the jdk install and one in the jogl/make/stub_jncludes/i/jni.h (I do not know if the jogl one has special customizations or if it is just a convenience copy)
jni.h includes a machine dependency include jni_md.h of which there are instances for various platforms in separate folders under the stub_includes/jni folder and one for the current platform in the jdk install.
I added an include path for my build to the one in JAVA_HOME for jni.h and added another include path for the "win32" folder under that for the platform include.
At this point the DLL built and linked properly, I was able to do so both with MSVC10 and GCC as my build script can specify either.
I was able to run a small java app that loaded the DLL the build created using System.load(dllpath), and called the sample method in the DLL.
It required the addition of no other libraries than the standard platform system libs, though I did have the gluegen_rt.dll in the run directory as well as the gluegen_rt.jar so it might have loaded that.
PK