Firstly, I am using Fedora and learning OpenGL. I would like to work with DevIL a little, so I installed both DevIL and DevIL-ILUT packages from the official repository. I have a test code for loading and rendering a file available, so I decided to test it (I will be learning some DevIL basics at my course, and we were given that file to make sure DevIL works fine for us).

The file contains line:

```
#include "IL/devil_cpp_wrapper.hpp"

```

so I copied the IL directory (which we also have available) to the directory with test file (IL directory contains a lot of header files, for example il.h, ilut.h, ilu.h, ...). However, the build failed at

```
#include <IL/ilut.h>

```

from the IL/devil\_cpp\_wrapper.hpp file. I don't get it, since I installed the packages. I tried putting every possible parameter to g++ (since I didn't find any useful manual for it, maybe I am just blind), -lIL, -lILU, -lILUT, -ldevil, for every possibility it gives me the same error. I wasn't able to find any proper solution, so I gave up and copied the IL directory also to /usr/include. This time it gave me this error for every library included:

```
/usr/bin/ld: cannot find <param>

```

So I deleted the directory, and tried replacing all system includes like the one in devil\_cpp\_wrapper.hpp by ones in the directory (since the files are called the same). The linker had the same issue, so I removed all library params and tried compiling it again, this time failing on "undefined reference" for DevIL-specific functions.

We have available also some files for dll (DevIL.dll, ILU.dll, ILUT.dll) and .lib to them, I tried linking also them, but still get the same undefined reference errors. Also, this course is made mainly for VS users, so I am not sure which files I should include.

I also tried building DevIL from their github source as is written in their README.unix file, but failed on the first step (autoreconf -i was failing for some libILUT.la; I tried also autoconf -i in case they have written it wrong, it failed for undefined win32 macro).

So, my question is: I am a noob who can't link DevIL. I tried everything I could think of, but can't find any solution. Can anyone help me?

EDIT: Since the build from github was failing, I decided to give it a chance and download their .tar and tried to compile from it. It seemed to be working at first, but then make returned "undefined reference to `png\_set\_gray\_1\_2\_4\_to\_8'" and "collect2: error: ld returned 1 exit status". Even after this I tried to complete the build with make install, which of course failed too, but in this attempt I got a few libraries into /usr/local/lib. However, I still can't compile my test program, because the mentioned undefined reference to png\_set\_gray\_1\_2\_4\_to\_8, which the linker complains about now.