I’m having linker errors and I hope you can help me. I’ve searched the web and tried all the solutions suggested but none is working for me. Below is just a few of the linker errors I am getting. Can someone help me out with it?
Consider if you really need devIL. It may be much simpler to load something like bmp files. They are fairly easy to decode. I tried to do get an application to work in both Linux and Windows, but had problems to get all libraries working.
Using DevIL on both Linux and windows has worked well for me – no problems.
Note on Linux you need to add “-lIL -lILU” (case sensitive) to the link options. In some cases you may also be using “-lILUT”. Note this implies that it is correctly installed. For instance, on my Linux box
DevIL is not a wrapper around STB Image. DevIL can load what STB Image loads, but there’s a difference between doing the same thing and one being a wrapper around the other.
It’s also a “wrapper” around formats that STB Image cannot load. So he might be ridding himself of linker errors, but he’d also be ridding himself of functionality.
Better to learn how compiling and linking actually works.
Then she should learn. Linking with libraries is a big part of what C and C++ programmers do. All avoiding it does is delay the inevitable. She’s going to have to learn sooner or later; better to do it now.
I am using a lot of bitmaps in my application. To save space, I used various formats. But when I had to use Devil, it turned out that several other libraries also had to be added. So maybe I am not that skilfull, but it was a mess to get it all working on Windows.
So I simplified, and use only bmp files now. It will use a little more disk space, but the installer application will compress them effectively anyway. It just wasn’t worth the effort.
If you are doing a small project, to learn OpenGL, then I would recommend the simple way. In the question from OP, there isn’t really enough information to give the best recommendations (as is quite common).
I don’t understand. How else can you link libraries if you are not using image libraries? I am using DevIL and I’m trying to link its libraries correctly. I’m using Dev C++. Under Project-> Project Options-> Parameters, I make sure I have the right paths to il ilu and ilut library files in there. The under Library Directories, I make sure I have the right path, for example: C:\Dev-Cpp\lib in there. I do the same for the Include Directories: C:\Dev-Cpp\include.
This is what I have in the Parameter box (where the library files must go):
To download and install from within the IDE:
goto tools
choose “check for Updates/Packages …”
select DevPak Server = devpaks.org Community Devpaks
click check for updates
select group “openGL”
click on “GLFW+OpenGL”
click “download selected”
Thanks. I’ll try that. I went to GLFW’s website and followed the instructions there. I compiled the GLFW program in the msvc100 folder which was in the GLFW folder I downloaded, and it built the .dll and .lib files. I used those but when I compiled the code, it gave me some weird errors: something about the files being outdated, plus the old errors I had.
So I’ll delete those files and try your suggestion. Hopefully I’ll get a more updated version. Thanks again. I’ll work on it and let you know how it goes.