Help! Compiling Windows executable with GCJ and LWJGL?

Started by Hobbes, December 27, 2003, 19:41:36

Previous topic - Next topic

Hobbes

Hello!

I am trying to get some of the NeHe tutorials/examples compiled with GCJ, without much luck.

It doesn't help that I have never used GCJ or GCC before. Compiling a "regular" Java-file works fine, but I suspect there is something more to the lwjgl.dll that needs to be done...?

The errors I get all look like this:
...
C:/.../Nehe.java:148: undefined reference to 'org::lwjgl::input::Keyboard::destroy()'

C:\...\Temp/cciecaaa.o(.text+0x51a):
C:/.../Nehe.java:149: undefined reference to 'org::lwjgl::opengl::Window::destroy()'
...

(Hope this works out, paths are snipped.)

It feels very much like it complains about all LWJGL-calls...

Any pointers are much appreciated!

Thanks, Hobbes

Hobbes

Me again, still curious   :)

I would like a simple step-by-step instruction on how to compile
Java-code that depends on LWJGL into native code,
on Windows or Linux, with GCJ.

It does say it is possible in the LWJGL introduction (found here
http://www.lwjgl.org/documents/tutorials/intro.html), so I assume
someone knows how it is done?

Right? Or is it the case that you are all either not doing this at all or
using other (I assume) non-free tools?

Either way, I would like to know!

:)

Thanks again, Hobbes

elias

The "official" is through the non-free tool Excelsior Jet. If I'm correct, you could fetch a trial version that depends on the JRE on the client machine (but is enough to show the basic principle behind Jet).

- elias

princec

I really recommend downloading the Personal Edition of Jet, which will give you a rough idea of what Jet can do. When you feel confident enough that Jet will do what you want (and it does), you can consider forking out the £500 for the full Professional version with JetPerfect in it, which compiles to single standalone executables with no dependencies, albeit with a little hassle.

It's harder than you think to remove all references to the AWT in your code. There's often a sneaky bit hiding in there.

Cas :)