Configuration of headers

Asked

Viewed 124 times

4

I am trying to compile some code in "C" via GCC (Derbian - Kali Linux), and when compiling, I get error messages saying that files like linux/linkage.h and asm/linkage.h not found. When issuing the locate linkage command. h, I checked that such files are in a directory other than the default directory. These files are in the folder /usr/src/linux-headers-4.3.0-kali1-common/include/linux/linkage.h and /usr/src/linux-headers-4.3.0-kali1-common/include/asm/linkage.h

How do GCC consider these directories instead of the default directories?

  • Did the answer solve your problem? Do you think you can accept it? If you don’t know how you do it, check out [tour]. This would help a lot to indicate that the solution was useful to you and to give an indication that there was a satisfactory solution. You can also vote on any question or answer you find useful on the entire site.

1 answer

3

Ideally the files would be in places where the compiler searches.

If this is not possible use compilation directive I and indicate where the include files are.

-I/usr/src/linux-headers-4.3.0-kali1-common/include/linux/
-I/usr/src/linux-headers-4.3.0-kali1-common/include/asm/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.