lwjgl 99 build error AL10 GL11 already defined in generated

Started by tanukitzu, March 12, 2006, 19:45:30

Previous topic - Next topic

tanukitzu

I tried building LWJGL 99 from source in Eclipse and I got the following error on the files:

AL10.java
GL11.java
GL12.java
GL13.java
GL14.java
GL15.java
GL20.java

The type AL10 is already defined.

This is because org.lwjgl.openal and org.lwjgl.opengl already define these classes in the generated code.

How do I build this without renaming these Interfaces?

Matzon

it seems eclipse is confused about the template dir and the src dir. Only include the src dir.

tanukitzu

Thanks!  That fixed the build error :)

We should keep in mind that it's a violation of the namespace specifications to have two Java files with the same name in the same package.  In the future this could cause worse problems than a build error.

I would like to suggest the files in the two directories other than 'src' should have their packages names appended with '.generated' and '.templates'.

The directories '/generated', '/templates', and '/java' should be removed leaving the only directory path to java source code as '/lwjgl_home/src/org/lwjgl/...'  This would allow the code that was in '/generated' and '/templates' to have their package names changed in order to coexist peacefully and properlly with the code in the package 'org.lwjgl.open...' with the same class names.

So then the generated and template code would be in the directories:

'/lwjgl_home/src/org/lwjgl/openal/generated/'
'/lwjgl_home/src/org/lwjgl/opengl/generated/'

'/lwjgl_home/src/org/lwjgl/openal/templates/'
'/lwjgl_home/src/org/lwjgl/opengl/templates/'

with the package names accordingly.

Not only would this achieve spec compliance but it would be easier to maintain as well because all source directories could be open in the same IDE project.

Let me know if you all like this change :)

Matzon

I dont see the problem... - just set src/java as the src dir instead of src/