Eclipse / LWJGL / SPGL and CVS

I guess this is mostly for Cas, though anyone really could answer.

As earlier noted, I have Eclipse and the LWJGL examples up and running. I then thought I’d take a look at the SPGL, which I plan (at this point) to use for something in the distant future, so I’m not too concerned with its rate of change, I just want to learn.

I’m not a newbie coder, but my experience is heavy in 4D (I’d be almost shocked if any of you’ve even heard of it, even though its not THAT uncommon). I am not terribly familiar with java and cvs and all that, hence the reason for my questions.

I’ve connected my eclipse to the sourceforge repositories, and set things up so that it actually downloads stuff. After doing this with LWJGL, I get the following errors:

  • The project was not built due to classpath errors (incomplete or involved in cycle).
  • Unable to read LWJGL/.classpath file.

I’m sure this error is easy enough to fix, but I’m wondering if its a sign of a greater problem, that I’ve configured my CVS wrong or done something else wrong, and that my entire source tree is faulty somehow.

After that, I did the same with SPGL, and got this error, which is self-explanatory.

  • The project was not built since it depends on LWJGL, which has classpath problems.

Thanks,

Brian

Ok,

I’ve figured out one more part of what I’m missing. I saw the build.xml file, and I remembered something about ant. I right clicked the xml file, and is said ‘run ant…’ so I went with it, with all the default options…and end up with this…

   [lwjgl] BUILD FAILED: file:C:/WORK/eclipse/workspace/LWJGL/build.xml:62: Unable to find a javac compiler;

com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

guess the defaults weren’t good enough…I’ll keep working at it, and post what I find here (maybe posterity will find it useful, if nothing else), but if someone already knows whats missing and wants to spare me the time…well I’d be personally very grateful.

Brian

Well, getting further along.

I played around with my environment, and actually got myself a JAVA_HOME set up in the first place, and then things started moving along pretty well…but it still errors out…

compile:
[lwjgl] Compiling 4 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[input] Compiling 3 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[openal] Compiling 15 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[opengl] Compiling 88 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[test] Compiling 16 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[vector] Compiling 8 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[examples] Compiling 16 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[examples] C:\WORK\eclipse\workspace\LWJGL\examples\BaseWindow.java:124: create(org.lwjgl.DisplayMode,boolean) in org.lwjgl.Display cannot be applied to (org.lwjgl.DisplayMode,boolean,java.lang.String)
[examples] Display.create(modes[mode], fullscreenflag, “LWJGL Example”);
[examples] ^
[examples] 1 error
[examples] BUILD FAILED: file:C:/WORK/eclipse/workspace/LWJGL/build.xml:68: Compile failed; see the compiler error output for details.

I’m not sure about this one, I think this may be bigger than I can handle at this time, perhaps one of you can advise?

Brian

[quote]BaseWindow.java:124: create(org.lwjgl.DisplayMode,boolean) in org.lwjgl.Display cannot be applied to (org.lwjgl.DisplayMode,boolean,java.lang.String)
[examples] Display.create(modes[mode], fullscreenflag, “LWJGL Example”);
[/quote]
This is a library version mismatch - you’re using some parts (examples) from cvs while the Display class is an older version.

You need to make sure that lwjgl is either completely .4 or all from CVS.

Ok, I deleted my lwgjl.jar file from my java_home\jre\lib\ext\ folder, (I think thats it) and then the compile seemed to start up well, but now it breaks on OpenAL.dll stuff…not knowing where the file is or something…I’ll keep playing with it…I’m definately getting somewhere

Brian

The DLLs included with LWJGL need to be present on your JVM’s library path - try setting the “java.library.path” property to wherever they reside.

Just install OpenAL into windows\system32.

Cas :slight_smile:

Ok…I’ll try that.

I have the three dll’s in my java_home/jre/bin/

folder, but I guess thats not good enough?

I’ve never stuck the LWJGL dll anywhere except where it actually gets built to by VC6 - so in all my eclipse run configs there’s a -Djava.library.path explicitly pointing to it. Works for me.

Cas :slight_smile:

Well now, I’m making great and dandy progress…placing the above mentioned dll’s into the system folder certain did the trick. The next one I am at a complete loss for though…I don’t really see WHY I need the *.so files for anything in my LIB folder…hrm…output as follows…also, how close am I to getting there? Pretty close, since I’m building the distribution, would be my guess…

I’ll keep chipping away over here…Thanks to all who read my pathetic little post(esp. those who reply !)

Buildfile: C:\WORK\eclipse\workspace\LWJGL\build.xml

splash:

all:

clean:
[cleaning temp folder] Deleting directory C:\WORK\eclipse\workspace\LWJGL\temp
[cleaning dist folder] Deleting directory C:\WORK\eclipse\workspace\LWJGL\dist
[cleaning javadoc folder] Deleting directory C:\WORK\eclipse\workspace\LWJGL\doc\javadoc
[cleaning bin folder] Deleting directory C:\WORK\eclipse\workspace\LWJGL\bin\org
[cleaning bin folder] Deleting 32 files from C:\WORK\eclipse\workspace\LWJGL\bin

initialize:
[initialiazing dist folder] Created dir: C:\WORK\eclipse\workspace\LWJGL\dist
[initialiazing docs folder] Created dir: C:\WORK\eclipse\workspace\LWJGL\doc\javadoc
[initialiazing temp folder] Created dir: C:\WORK\eclipse\workspace\LWJGL\temp

compile:
[lwjgl] Compiling 4 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[input] Compiling 3 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[openal] Compiling 15 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[opengl] Compiling 88 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[test] Compiling 16 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[vector] Compiling 6 source files to C:\WORK\eclipse\workspace\LWJGL\bin
[examples] Compiling 16 source files to C:\WORK\eclipse\workspace\LWJGL\bin

initialize:

compile:

package:
[lwjgl.jar] Building jar: C:\WORK\eclipse\workspace\LWJGL\lib\lwjgl.jar
[lwjgl_test.jar] Building jar: C:\WORK\eclipse\workspace\LWJGL\lib\lwjgl_test.jar
[examples.jar] Building jar: C:\WORK\eclipse\workspace\LWJGL\lib\examples.jar

distribution_application:
[fail] BUILD FAILED: file:C:/WORK/eclipse/workspace/LWJGL/build.xml:181: Missing libopenal.so in lib directory

[quote]I don’t really see WHY I need the *.so files for anything in my LIB folder
[/quote]

[quote] distribution_application:
[fail] BUILD FAILED: file:C:/WORK/eclipse/workspace/LWJGL/build.xml:181: Missing libopenal.so in lib directory
[/quote]
You shouldn’t be running the distribution_application target - it is a target we use when we are creating a distribution (which requires all the dll’s and so’s for all platforms).

All of the targets that fiddle with dll’s are sort of flaky - they generally work, but mostly only on windows :confused:

We’re working on all this, but we really need to run whatever targets that are required to build the native dll too - this is easy to do in linux since it has a buildfile, but windows version is still being build using Visual Studio.
We will some day fix this with a makefile for windows too, but since none of the windows devs has any experience with this, don’t hold your breath.

Ahh, so the default ant configuration WONT work afterall? Ok, that makes some sense to me.

What targets need to be made in order for me to begin working on building SPGL? (see top post)

I have absolutely no idea :slight_smile: Every time I try to figure out Ant it does something unexpected.

Cas :slight_smile:

[quote]Ahh, so the default ant configuration WONT work afterall? Ok, that makes some sense to me.
[/quote]
the default ant configuration works fine for compilation and javadoc - it is the distribution targets that only work when all requirements are fullfillled.

[quote] What targets need to be made in order for me to begin working on building SPGL? (see top post)
[/quote]
SPGL is another project, and does so far not have any ANT files. Cas has yet to see the light regarding ANT :stuck_out_tongue:

Alright Cas,

What needs to be done to SPGL to get it to build? Presently I get an error from it …

The project was not built since it depends on LWJGL, which has classpath problems.

I know that LWJGL works for me, and I gather from your comments about ANT that you don’t build it yourself, so something must be needed. I’ve included the lwjgl.jar file as an external jar library, but it didn’t help…what can I do to get this to work?

I want to use it as a basis for my REAL project (which I’ll announce after I finish a couple of these smaller games, like the asteroids clone I’m doing now…)

Thanks!!

Brian

Ah, the foibles of Eclipse. Right click on SPGL -> Properties, get the Java Build Path up and you’ll notice it’s probably referring to your CVS checkout of LWJGL, which I assume is still buggered. You’ll have to add the lwjgl.jar as a library to it instead… except SPGL is currently based on LWJGL 0.5 and won’t work :slight_smile:

I think you should try to get LWJGL compiling from the CVS code. You have, in LWJGL, added a Source Folder called src\java, yes? That’s where your Java source code should be.

Cas :slight_smile: