lwjgl in Eclipse...

Started by jiapei100, November 16, 2009, 23:51:00

Previous topic - Next topic

jiapei100


Hi, all:

I downloaded source of lwjgl 2.2.1  and make it a project in Eclipse.
However, there are always some "red crosses" to indicate the compilation errors.

1) lwjgl/src/templates   org.lwjgl.openal
AL10.java
AL11.java

2) lwjgl/src/templates   org.lwjgl.opengl
GL11.java
GL12.java
GL13.java
GL14.java
GL15.java
GL20java
GL21.java
GL30.java
GL31.java
GL32.java


All errors are telling

The type XXXX is already defined


for instance

The type GL11 is already defined


So, I'm just wondering where I defined these "interfaces" before?
How can I avoid these annoying "red crosses" for lwjgl 2.2.1?


Thank you very much !!

Regards
JIA

Welcome to Longer Vision

asch

disclaimer: I am not an lwjgl developer, just a user.

AFAIK templates are used as a source to generate the files in the generated folder.

They are not valid Java sources but are to be processed by a preprocessor. If you just want to build the lwjgl library you have to remove that folder from source folders you don't need them there.

I don't know what program processes those templates but the generated Java and generated native sources seem to be created by that mystical pre-processor. Certainly you don't need the pre-processor as the processed files are also part of the distribution.

Matzon

correct.
The templates are processed by APT - the Annotation Processor Tool which is included in the JDK.

The rules for the annotations are themselves in the org.lwjgl.util.generator and generates both java and c code.

jiapei100



Thank you so much for your clear explanation.

In this case, it's better that I don't use Eclipse  ^_^, so that there will be no error indications.


;D
Welcome to Longer Vision

Matzon

no, just make sure you add: src/java and src/generated as the source folder instead of src

jiapei100


Thanks. ^_^
Everything goes fine now.
Thank you.

Rgds


Quote from: Matzon on November 17, 2009, 08:02:20
no, just make sure you add: src/java and src/generated as the source folder instead of src
Welcome to Longer Vision