--- "John M. Gabriele" <john_sips_tea(a)yahoo.com> wrote:
--- Thomas Fitzsimmons <fitzsim(a)redhat.com> wrote:
> On Sun, 2005-08-14 at 14:58 -0700, John M. Gabriele wrote:
> > What's preferred for use on FC4: jogl or lwjgl? Or
> > is there a third option -- maybe some way to do it
> > with Java-Gnome?
> >
> > I can't find jogl or lwjgl with yum search.
> >
> > I found some jogl rpms in Anthony Green's folder:
> >
http://people.redhat.com/green/FC4/
> >
> > but when I try to install them it tells me:
> >
> > [root@localhost temp]# ls *.rpm
> > jogl-1.1b11-1fc.i386.rpm jogl-javadoc-1.1b11-1fc.i386.rpm
> > [root@localhost temp]# rpm -ihv jogl-*
> > error: Failed dependencies:
> > libjawt.so.6 is needed by jogl-1.1b11-1fc.i386
> >
> > Looks like a libjawt was renamed, but these rpms don't
> > know about it.
>
> At least some of the jogl tests work on Fedora Core 4. Try rebuilding
> Anthony's jogl RPMs from the SRPM:
>
> rpmbuild --rebuild <jogl SRPM>
>
I ran:
rpmbuild --rebuild jogl-1.1b11-1fc.src.rpm
and it created three rpms:
[root@localhost temp]# ls -l /usr/src/redhat/RPMS/i386/
total 7556
-rw-r--r-- 1 root root 4649324 Aug 14 20:44 jogl-1.1b11-1fc.i386.rpm
-rw-r--r-- 1 root root 1781057 Aug 14 20:45
jogl-debuginfo-1.1b11-1fc.i386.rpm
-rw-r--r-- 1 root root 1266692 Aug 14 20:44 jogl-javadoc-1.1b11-1fc.i386.rpm
I then installed them:
[root@localhost temp]# rpm -ihv /usr/src/redhat/RPMS/i386/*.rpm
Preparing... ###########################################
[100%]
1:jogl-javadoc ########################################### [
33%]
2:jogl ########################################### [
67%]
3:jogl-debuginfo ###########################################
[100%]
[root@localhost temp]# rpm -qa | grep -i jogl
jogl-1.1b11-1fc
jogl-javadoc-1.1b11-1fc
jogl-debuginfo-1.1b11-1fc
The user guide landed here:
file:///usr/share/doc/jogl-1.1b11/userguide/index.html
And the javadocs here:
file:///usr/share/javadoc/jogl-1.1b11/index.html
I put my notes on it here:
http://www.simisen.com/jmg/pmwiki/pmwiki.php?n=Main.JavaOpenGL
---John
Darn. Compiling a small test program to bytecode goes ok:
gcj --classpath=/usr/share/java/jogl.jar -C Test.java
But when I try to run it, I get:
[john@localhost ~/dev/java/JOGL_Example]$ gij -cp /usr/share/java/jogl.jar Test
Exception in thread "main" java.lang.UnsatisfiedLinkError: libjawt: file not
found
at java.lang.Runtime._load(java.lang.String, boolean)
(/usr/lib/libgcj.so.6.0.0)
at java.lang.Runtime.loadLibrary(java.lang.String)
(/usr/lib/libgcj.so.6.0.0)
at java.lang.System.loadLibrary(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at net.java.games.jogl.impl.NativeLibLoader$1.run()
(/usr/lib/libjogl-1.1b11.jar.so)
at
java.security.AccessController.doPrivileged(java.security.PrivilegedAction)
(/usr/lib/libgcj.so.6.0.0)
at net.java.games.jogl.impl.NativeLibLoader.load()
(/usr/lib/libjogl-1.1b11.jar.so)
at net.java.games.jogl.impl.x11.X11GLContextFactory.<clinit>()
(/usr/lib/libjogl-1.1b11.jar.so)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
(/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at net.java.games.jogl.impl.GLContextFactory.getFactory()
(/usr/lib/libjogl-1.1b11.jar.so)
at
net.java.games.jogl.GLDrawableFactory.createGLCanvas(net.java.games.jogl.GLCapabilities,
net.java.games.jogl.GLCapabilitiesChooser, net.java.games.jogl.GLDrawable,
java.awt.GraphicsDevice) (/usr/lib/libjogl-1.1b11.jar.so)
at
net.java.games.jogl.GLDrawableFactory.createGLCanvas(net.java.games.jogl.GLCapabilities,
net.java.games.jogl.GLCapabilitiesChooser, net.java.games.jogl.GLDrawable)
(/usr/lib/libjogl-1.1b11.jar.so)
at
net.java.games.jogl.GLDrawableFactory.createGLCanvas(net.java.games.jogl.GLCapabilities)
(/usr/lib/libjogl-1.1b11.jar.so)
at Test.main(java.lang.String[]) (Unknown Source)
at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Compiling to object works also:
gcj --classpath=/usr/share/java/jogl.jar -c Test.java
but trying to link that fails:
[john@localhost ~/dev/java/JOGL_Example]$ gcj
--classpath=/usr/share/java/jogl.jar --main=Test -o MyTest Test.o
Test.o(.text+0x1d): In function
`TestRenderer::init(net::java::games::jogl::GLDrawable*)':
Test.java: undefined reference to `net::java::games::jogl::GLDrawable::class$'
Test.o(.text+0x4b):Test.java: undefined reference to
`net::java::games::jogl::DebugGL::class$'
Test.o(.text+0x69):Test.java: undefined reference to
`net::java::games::jogl::GLDrawable::class$'
Test.o(.text+0x87):Test.java: undefined reference to
`net::java::games::jogl::DebugGL::DebugGL(net::java::games::jogl::GL*)'
Test.o(.text+0x9d):Test.java: undefined reference to
`net::java::games::jogl::GLDrawable::class$'
Test.o(.text+0x1ad): In function
`TestRenderer::display(net::java::games::jogl::GLDrawable*)':
Test.java: undefined reference to `net::java::games::jogl::GL::class$'
Test.o(.text+0x1df):Test.java: undefined reference to
`net::java::games::jogl::GL::class$'
Test.o(.text+0x20c):Test.java: undefined reference to
`net::java::games::jogl::GL::class$'
Test.o(.text+0x247):Test.java: undefined reference to
`net::java::games::jogl::GL::class$'
Test.o(.text+0x276):Test.java: undefined reference to
`net::java::games::jogl::GL::class$'
Test.o(.text+0x2b4):Test.java: more undefined references to
`net::java::games::jogl::GL::class$' follow
Test.o(.text+0x489): In function `Test::main(JArray<java::lang::String*>*)':
Test.java: undefined reference to
`net::java::games::jogl::GLCapabilities::class$'
Test.o(.text+0x4a5):Test.java: undefined reference to
`net::java::games::jogl::GLCapabilities::GLCapabilities()'
Test.o(.text+0x5a2):Test.java: undefined reference to
`net::java::games::jogl::GLDrawableFactory::getFactory()'
Test.o(.text+0x646):Test.java: undefined reference to
`net::java::games::jogl::GLCanvas::addGLEventListener(net::java::games::jogl::GLEventListener*)'
Test.o(.text+0x651):Test.java: undefined reference to
`net::java::games::jogl::Animator::class$'
Test.o(.text+0x66b):Test.java: undefined reference to
`net::java::games::jogl::Animator::Animator(net::java::games::jogl::GLDrawable*)'
Test.o(.data+0x154): undefined reference to
`net::java::games::jogl::Animator::class$'
Test.o(.data+0x2c4): undefined reference to
`net::java::games::jogl::GL::class$'
Test.o(.data+0x2d4): undefined reference to
`net::java::games::jogl::GLDrawable::class$'
Test.o(.data+0x394): undefined reference to
`net::java::games::jogl::GLEventListener::class$'
collect2: ld returned 1 exit status
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs