Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  Compilation problems on OS X  (Read 1084 times)
0 Members and 1 Guest are viewing this topic.
Offline Viro

Senior Newbie




Java games rock!


« Posted 2004-01-04 13:43:24 »

Hi, I'm having problems compiling the Game sample application on OS X. This was found at http://www.lwjgl.org/documents/tutorials/opengl/skeleton_code.html. It seems that a number of the methods that are used in Game aren't defined in lwjgl.jar (or in the source for that matter).

Consider the following from Game.java (line 23)
Quote

   //select above found displaymode
   Display.create(modes[mode], false);


It doesn't compile because it says that Display.create doesn't exist. I've downloaded the source for LWJGL, and looked through the entire org.lwjgl.Display class, and find no definition of the method at all.

There were 26 other errors. I'll include them below as they refer to methods that don't exist, or to trying to instantiate an abstract class. I'm not sure what's going on, but I'd be really grateful if someone could help.

p.s. Oh and by the way, the strange thing is that the compiled demo applications that are provided in lwjgl_test.jar seem to run fine. Huh

Quote

Game.java [23:1] cannot resolve symbol
symbol  : method create (org.lwjgl.DisplayMode,boolean)
location: class org.lwjgl.Display
           Display.create(modes[mode], false);
                  ^
Game.java [31:1] org.lwjgl.opengl.GL is abstract; cannot be instantiated
   public static final GL gl = new GL();
                               ^
Game.java [32:1] org.lwjgl.opengl.GLU is abstract; cannot be instantiated
   public static final GLU glu = new GLU(gl);
                                 ^
Game.java [36:1] cannot resolve symbol
symbol  : method create ()
location: class org.lwjgl.opengl.GL
           gl.create();
             ^
Game.java [66:1] cannot resolve symbol
symbol  : method swapBuffers ()
location: class org.lwjgl.opengl.GL
               gl.swapBuffers();
                 ^
Game.java [92:1] cannot resolve symbol
symbol  : variable COLOR_BUFFER_BIT
location: class org.lwjgl.opengl.GL
       gl.clear(GL.COLOR_BUFFER_BIT);
                  ^
Game.java [93:1] cannot resolve symbol
symbol  : method pushMatrix ()
location: class org.lwjgl.opengl.GL
       gl.pushMatrix();
         ^
Game.java [94:1] cannot resolve symbol
symbol  : method translatef (int,int,float)
location: class org.lwjgl.opengl.GL
       gl.translatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
         ^
Game.java [95:1] cannot resolve symbol
symbol  : method rotatef (float,int,int,float)
location: class org.lwjgl.opengl.GL
       gl.rotatef(angle, 0, 0, 1.0f);
         ^
Game.java [96:1] cannot resolve symbol
symbol  : variable QUADS
location: class org.lwjgl.opengl.GL
       gl.begin(GL.QUADS); {
                  ^
Game.java [97:1] cannot resolve symbol
symbol  : method vertex2i (int,int)
location: class org.lwjgl.opengl.GL
           gl.vertex2i(-50, -50);
             ^
Game.java [98:1] cannot resolve symbol
symbol  : method vertex2i (int,int)
location: class org.lwjgl.opengl.GL
           gl.vertex2i(50, -50);
             ^
Game.java [99:1] cannot resolve symbol
symbol  : method vertex2i (int,int)
location: class org.lwjgl.opengl.GL
           gl.vertex2i(50, 50);
             ^
Game.java [100:1] cannot resolve symbol
symbol  : method vertex2i (int,int)
location: class org.lwjgl.opengl.GL
           gl.vertex2i(-50, 50);
             ^
Game.java [102:1] cannot resolve symbol
symbol  : method end ()
location: class org.lwjgl.opengl.GL
       gl.end();
         ^
Game.java [103:1] cannot resolve symbol
symbol  : method popMatrix ()
location: class org.lwjgl.opengl.GL
       gl.popMatrix();
         ^
Game.java [124:1] cannot resolve symbol
symbol  : variable PROJECTION
location: class org.lwjgl.opengl.GL
       gl.matrixMode(GL.PROJECTION);
                       ^
Game.java [125:1] cannot resolve symbol
symbol  : method loadIdentity ()
location: class org.lwjgl.opengl.GL
       gl.loadIdentity();
         ^
Game.java [126:1] cannot resolve symbol
symbol  : method ortho2D (int,int,int,int)
location: class org.lwjgl.opengl.GLU
       glu.ortho2D(0, Display.getWidth(), 0, Display.getHeight());
          ^
Game.java [127:1] cannot resolve symbol
symbol  : variable MODELVIEW
location: class org.lwjgl.opengl.GL
       gl.matrixMode(GL.MODELVIEW);
                       ^
Game.java [128:1] cannot resolve symbol
symbol  : method loadIdentity ()
location: class org.lwjgl.opengl.GL
       gl.loadIdentity();
         ^
Game.java [129:1] cannot resolve symbol
symbol  : method viewport (int,int,int,int)
location: class org.lwjgl.opengl.GL
       gl.viewport(0, 0, Display.getWidth(), Display.getHeight());
         ^
Game.java [134:1] cannot resolve symbol
symbol  : method getDirectBufferAddress (java.nio.ByteBuffer)
location: class org.lwjgl.Sys
       int buf_addr = Sys.getDirectBufferAddress(num_tex_units_buf);
                         ^
Game.java [135:1] cannot resolve symbol
symbol  : variable MAX_TEXTURE_UNITS_ARB
location: class org.lwjgl.opengl.GL
       gl.getIntegerv(GL.MAX_TEXTURE_UNITS_ARB, buf_addr);
                        ^
Game.java [146:1] cannot resolve symbol
symbol  : method destroy ()
location: class org.lwjgl.opengl.GL
       gl.destroy();
         ^
Game.java [147:1] cannot resolve symbol
symbol  : method destroy ()
location: class org.lwjgl.Display
       Display.destroy();
              ^
26 errors
Errors compiling Game.
Offline tom
« Reply #1 - Posted 2004-01-04 15:14:38 »

The tutorial was written for an old version of lwjgl. And newer versions of lwjgl is not backwards compatible with the old.

Instead use the examples that came with the source code of the lwjgl. They are up to date and will compile.

Offline Viro

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-01-04 16:11:23 »

I can't seem to find the source for the examples shipped in lwjgl_test.jar. I've expanded the jar file, but all I found were .class files.

Looking at the source code of LWJGL doesn't yield any examples either. That tutorial really should be updated to reflect the changes in LWJGL, as it will spare newbies a lot of pain.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #3 - Posted 2004-01-04 16:37:10 »

make sure you download the source.

And you are right, that does need to be updated. In fact, I think it would be more beneficial to delete it completely if there are no plans to update it soon. I does more harm than good.

Don't send a man to do a monkey's work.
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #4 - Posted 2004-01-05 04:37:17 »

Quote
Looking at the source code of LWJGL doesn't yield any examples either. That tutorial really should be updated to reflect the changes in LWJGL, as it will spare newbies a lot of pain.

Agreed. I will look into substituting the ogl and oal examples with one complete example og ogl+oal+input - stay tuned.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!