-
Hi all, I am working on developing liunx kernel in vscode. When I include "<linux/module.h>" in the source file, IntellisSense will jump to "/usr/include/linux/module.h" instead of "/usr/src/$(uname -r)/include/linux/module.h". Can anyone provide some hints to address this problem? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I also try to add "/usr/src/$(uname -r)/include" in includePath field in c_cpp_properties.json,but it does not help. |
Beta Was this translation helpful? Give feedback.
-
@yzr95924 |
Beta Was this translation helpful? Give feedback.
I'm a bit surprised since I thought the path that was interfering was
/usr/include
which comes from your compiler's system include path that is added after theincludePath
you've specified. I'm wondering if your local version of<linux/module.h>
has an#include_next
in it?The observation you've made above is correct though. If you want a certain path to take precedence over the recursive search in your workspace folder (
${workspaceFolder}/**
), you add it at the beginning of theincludePath
.