I'm trying to write my own pci-device driver on an Ubuntu system.
The example I found says that I need:
#include
#include
#include
I'm using Qt and it underlines the first
include
as a mistake.
When I put the mouse cursor under the 2nd or 3rd line, it shows me a tip: /usr/include/linux/module.h
or /usr/include/linux/pci.h
, so I opened /usr/include/linux
in file explorer, and there is no init.h
.
I ran sudo apt install linux-headers-generic
but it didn't help.
locate linux/init.h
gives:
/usr/src/linux-headers-5.15.0-121/include/linux/init.h
/usr/src/linux-headers-5.15.0-122/include/linux/init.h
/usr/src/linux-headers-5.15.0-43/include/linux/init.h
So is my problem that I have to add something to my PATH
or do I have to install something else?
Yes, I've seen a lot of topics about people having problems with compiling something because of linux/init.h: no such file or directory
, but I am not compiling, I can't even include it.
Asked by DrageFabeldyr
(1 rep)
Sep 27, 2024, 10:07 AM
Last activity: Sep 27, 2024, 10:25 AM
Last activity: Sep 27, 2024, 10:25 AM