• Advertisement
Sign in to follow this  

devIL Import Problem

This topic is 4394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im using LWJGL,and I cant import the devIL library for texturing. All of my other imports are working,so this one should be too. Here is my import line: import org.lwjgl.devil.IL; (it justs gives me a error whenever I try running wit with this) Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
What version of LWJGL do you use? Try with the lates build - v0.99

Share this post


Link to post
Share on other sites
Quote:
Original post by zero_792
What ia a compiler and editor error?


Does the editor show the error or when you try to compile/build does it show the error?

Share this post


Link to post
Share on other sites
Quote:
Original post by zero_792
When I press the run(or whatever) button,it gives me the error. Dunno if that helps.
:)


What IDE are you using? Have you tried doing a clean build without clicking run? If so did the clean build generate any errors? What kind of error messages are you getting?

Share this post


Link to post
Share on other sites
Im using Eclipse.To run it,I did right-click > run as > Java Application, and then the error appears in the console.

Share this post


Link to post
Share on other sites
In eclipse go to the project menu and select build all. If you get and error after doing that let us know.

Also what are the error messages?

Share this post


Link to post
Share on other sites
Ah, Eclipse? In order to run LWJGL prorams FROM Eclipse , you should go to Run button (green arrow) ---> Arguments dialog window. There, in VM Arguments textfield, add
-Djava.library.path=C:\....your path...\lwjgl-win32-0.99\native

That should do it!

Share this post


Link to post
Share on other sites
I already did that,and the program can run,but I cant use the devIL library with it(the import dosnt work).

Share this post


Link to post
Share on other sites
Hmmm.. zero, any error log that we can see? Maybe you should try to compile and execute it out of eclipse to make shure that your problem is IDE based?

Share this post


Link to post
Share on other sites
Are you sure you've added the lwjgl_devil.jar (at least that's what it's called in 0.97) to your build path? "project->properties->java build path->libraries->add external jar"
Also could you post the exact error you get? You're not giving us enough information.

Share this post


Link to post
Share on other sites
Yes, Im with BertS, I think that's it. No lwjgl_devil.jar in library path. You *have* to try that.

Share this post


Link to post
Share on other sites
The only error it gives me is:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:

at lwjgl_test.main(lwjgl_test.java:24)

Line 24 is: public static void main(String args[]) {
Im not sure how to find the log file with eclipse :p All I did to link eclipse to LWJGL is add -Djava.library.path=C:\lwjgl-win32-0.99\lwjgl-win32-0.99\native in the VM arguments.

Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by zero_792
All I did to link eclipse to LWJGL is add -Djava.library.path=C:\lwjgl-win32-0.99\lwjgl-win32-0.99\native in the VM arguments.

If that is all, then you are missing something. As we stated before, you should add all lwjgl jars into your project so it can compile it.
"project->properties->java build path->libraries->add external jar" ---> add all .jar from lwjgl

Share this post


Link to post
Share on other sites
When I added all the .jar(all the things which were folder,like lwjgl_devil,etc.),it gives me:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
and a ton of errors about the lwjgl commands,in the error console

Share this post


Link to post
Share on other sites
Ok,now I fixed that,but when im trying to load a image it wont work(I think),because it gives me errors on the lines:
texture = loadTexture("NeHe.bmp");
and
IL.ilGenImages(1, image);
Yes,its from the nehe tutorials :)

Any help? Thanks

[Edited by - zero_792 on January 10, 2006 9:37:57 PM]

Share this post


Link to post
Share on other sites
Zero, i know about this error. NEHE tutorial is sort of outdated, new method is this:

IL.ilGenImages(image);

instead of

IL.ilGenImages(1,image);

cheers!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement