This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
GCJ and OpenGL under Win32
- From: Sal <gcj at svf dot dreamhost dot com>
- To: java at gcc dot gnu dot org
- Date: Wed, 05 Jan 2005 02:40:43 -0500
- Subject: GCJ and OpenGL under Win32
- Reply-to: gcj at svf dot dreamhost dot com
I've been looking for a way to get GCJ and OpenGL to work together
under win32. I've tried different OpenGL libs with GCJ and had little
luck... jogl uses Swing stuff that chokes gcj, lwgl gives many
compile/link errors, but SWT's experimental OpenGL seems to almost work.
I had problems building SWT 3.0.1, recieved some 'Validation failed'
errors when I was compiling, but I managed to work around it by adding
the SWT source to my project directly. There seems to be some problem
with compiling SWT 3.0.1 from its .jar file. Also GCJ picked up some
errors in the SWT source that Sun's compiler must have missed (a method
was overridden with the wrong return value).
After that I tried to build the 'experimental' OpenGL library for SWT.
I had to build it from source also, recieved errors trying to build it
from the jar file.
All seems to work fine with SWT and OpenGL, my test application compiles
and links. But when I run my application I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: gluPerspective
at 0x00651ffe (Unknown Source)
at 0x006519d2 (Unknown Source)
at 0x00652944 (Unknown Source)
[... repeat long traceback here...]
I've put the gl-win32.dll in the executable directory, along with the
SWT dll. I've also tried modifying my makefile to link with libglu32 &
libopengl32 that come with mingw32. (using -llibglu32 etc.) But
continue to recieve the 'UnsatisfiedLinkError' at runtime. Can anyone
give some advice on this?
If anyone has been able to get an OpenGL implementation to work under
GCJ I would be interested in hearing about it, also!
Thanks much in advance,
- Sal