I would like to be able to use the devIL library for a project I am working on, but for some reason I cannot get it set up correctly. In my project, I have:
#include <IL/il.h>
#include <IL/ilu.h>
#include <IL/ilut.h>
If I do not call any devIL functions, then the file will compile with no errors. However, as soon as I include
ilInit();
I get
undefined reference to `ilInit'
collect2: ld returned 1 exit status
What am I doing wrong?
Edit: I am running Ubuntu 11.10
Apparently you are including the headers, but not linking the binaries. With gcc, this can be done using the -l
-option.