Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Compiled LWJGL with GCJ  (Read 1897 times)
0 Members and 1 Guest are viewing this topic.
Offline vrm

Junior Devvie

where I should sign ?

« Posted 2003-05-19 20:31:28 »

compiled whole LWJGL with gcj 3.3  Cool

it's far more completed than previous version

part of java.awt is missing (like we care Grin)
javax.swing is missing (like we care at all Grin)
javax.imageio is missing not really important but needed for some examples I tried to run

I compiled with ant, (tweaked the build.xml for change compiler and it worked)

I'm trying to run the bytecode, but it's asking the _d debug lib

I don't remeber how to build it , elias explained me once Sad

vrm@vrm:~/LWJGL/lib$ gij -cp examples.jar:lwjgl.jar Polygon
Exception in thread "main" java.lang.UnsatisfiedLinkError: lwjgl_d: file not found
  at java.lang.Runtime._load(java.lang.String, boolean) (/usr/lib/
  at java.lang.Runtime.loadLibrary(java.lang.String) (/usr/lib/
  at java.lang.System.loadLibrary(java.lang.String) (/usr/lib/
  at org.lwjgl.Sys.initialize() (Unknown Source)
  at org.lwjgl.Sys.<clinit>() (Unknown Source)
  at java.lang.Class.initializeClass() (/usr/lib/
  at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/
  at BaseWindow.start(int, int, int, boolean) (Unknown Source)
  at Polygon.main(java.lang.String[]) (Unknown Source)

next step is binary compile

I hope it's going to be small or at least gij is small and efficient (/me looks at sun bloated JRE)
Offline Jacko

Junior Devvie

« Reply #1 - Posted 2003-05-19 21:34:28 »

Think you'll run into more problems than just that I think. The direct bytebuffer implementation isnt there yet, just stubs to be filled in later, which is the real killer for using lwjgl with gcj at the moment.

And gij is just an interpreter so I wouldnt expect much performance out of that.
Offline vrm

Junior Devvie

where I should sign ?

« Reply #2 - Posted 2003-05-20 06:40:50 »


vrm@vrm:~/LWJGL/lib$ gij --cp ./examples.jar:./lwjgl.jar Polygon
Removed 0 duplicate displaymodes
Exception in thread "main" java.lang.Error: direct buffers are not implemented
  at java.nio.ByteBuffer.allocateDirect(int) (/usr/lib/
  at org.lwjgl.input.Keyboard.<clinit>() (Unknown Source)
  at java.lang.Class.initializeClass() (/usr/lib/
  at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/
  at BaseWindow.createGLWindow(int, int, int, boolean) (Unknown Source)
  at BaseWindow.start(int, int, int, boolean) (Unknown Source)
  at Polygon.main(java.lang.String[]) (Unknown Source)

anyway it's far better than the first time I tried Smiley
I managed to compile
wait & see
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline AndersDahlberg

Junior Devvie

« Reply #3 - Posted 2003-06-02 17:11:05 »

UPDATE: downloading and compiling gcj 3.4 (e.g. cvs version)

looking at java/nio/ I believe they have a working implementation on big endian machines (almost all methods contains FIXME: this only handles big endian)

So it shouldn't be long until compiling lwjgl with gcj becomes a reality! Smiley
Offline vrm

Junior Devvie

where I should sign ?

« Reply #4 - Posted 2003-06-04 10:17:14 »

nice, I would like to help, but I'm in a long buisness travel
Offline AndersDahlberg

Junior Devvie

« Reply #5 - Posted 2003-06-05 16:37:38 »

Hehe, this sure isn't easy, but here are my findings so far:

downloaded and installed gcj 3.4 from cvs to /usr/local (enable-languages=c++,java) - no problems

downloaded and installed openal from cvs to /usr/local - no problems

downloaded and compiled lwjgl from cvs (regular build)

compiled lwjgl java sources with gcj -fjni ... and linked to form a "native" shared library.

compiled the PolygonColoured example by compiling and with gcj and linked them up with previous built lwjgl libraries

Everything ok so far -

Though it doesn't work  Wink

running PolygonColoured is ok  (ie window shows up and some dumps of supported opengl extensions are shown in the console) until the glu is used to set up some view point (?) in

there it crashes out with a SIGABORT or something like that Sad

Maybe next time - or somebody else might get lucky Wink
Offline princec

« JGO Spiffy Duke »

Medals: 555
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #6 - Posted 2003-06-05 17:29:05 »

Actually y'all have been worried about the complete lack of buffers in GCJ when of course there's nothing stopping you writing your own wee DLL with your own ByteBuffer class in it and tweaking the LWJGL to use it (seeing as we use ints everywhere all you really need is basically malloc() and free(), and some put/get methods)

Cas Smiley

Offline AndersDahlberg

Junior Devvie

« Reply #7 - Posted 2003-06-05 18:09:36 »

As I said before, I believe there now is a (limited) working solution of buffers (and rest of java.nio) available in cvs - not sure what went wrong above but it sure looks like same old buffer problem though.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Jesse (15 views)
2015-07-29 04:35:27

Riven (37 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (21 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (41 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!