Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 908 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.
Online 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!
Try the Free Demo of Titan Attacks
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
« League of Dukes »

JGO Knight


Medals: 13
Projects: 2


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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (72 views)
2013-05-17 21:29:12

alaslipknot (84 views)
2013-05-16 21:24:48

gouessej (113 views)
2013-05-16 00:53:38

gouessej (108 views)
2013-05-16 00:17:58

theagentd (119 views)
2013-05-15 15:01:13

theagentd (108 views)
2013-05-15 15:00:54

StreetDoggy (153 views)
2013-05-14 15:56:26

kutucuk (176 views)
2013-05-12 17:10:36

kutucuk (173 views)
2013-05-12 15:36:09

UnluckyDevil (182 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.738 seconds with 20 queries.