PDA

View Full Version : installing DevIL image library


AstralAbraxas
30th October 2011, 06:04 PM
I've installed DevIL image library on f14 but when I try to link it with g++ I am still getting an error stating:

fatal error: IL/IL.h: No such file or directory

As the error states I have

#include <IL/IL.h>

in my file... and I tried linking DevIL with -lIL

My only guess is that it's not installed properly. I've installed it using yum... I'm really not sure what to do in order to get it to work... When I installed it everything seemed to go ok...

I know I'm not really giving a whole lot of information to go on but I really have no idea.

jpollard
30th October 2011, 06:18 PM
It is telling you that /usr/include/IL/... doesn't exist.

If you use the -I option you need to specify the path to the directory referenced (IL) in this case. Not the directory itself. If you have IL installed in your home directory then the path would be
/home/install, where /home/install/IL/IL.h would be the full path.

Alternatively, you can also use relative paths - If you have the directory IL in your working directory then you can use -I . (current directory).

The default operation for #include <something.h> is to include the file /usr/include/somehting.h. If it is <something/something.h> then it is to include the file /usr/include/something/something.h. To specify other directories you have to specify the path to replace the "/usr/include"
with; and that option is -I for the compilers.