J'ai essayé de gcc à dump the include paths et mon dossier .clang_complete
ressemble maintenant à:Comment configurer clang_complete pour le développement du module noyau Linux?
-std=gnu89
-nostdinc
-I/usr/src/linux-headers-3.0.0-16-generic/arch/x86/include
-I/lib/modules/3.0.0-16-generic/build/arch/x86/include/generated
-I/lib/modules/3.0.0-16-generic/build/include
-I/lib/modules/3.0.0-16-generic/build/ubuntu/include
-I/usr/lib/gcc/i686-linux-gnu/4.6.1/include
-D__KERNEL__
-DMODULE
Mais libclang
se plaint encore des tonnes d'erreurs & avertissements lors de l'édition d'un module de noyau simple Bonjour tout le monde.
1 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|24 col 42 warning| declaration of 'struct list_head' will not be visible outside of this function
2 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|26 col 6 error| incomplete definition of type 'struct list_head'
3 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|24 col 42 info| forward declaration of 'struct list_head'
4 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|27 col 6 error| incomplete definition of type 'struct list_head'
5 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|24 col 42 info| forward declaration of 'struct list_head'
6 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|37 col 38 warning| declaration of 'struct list_head' will not be visible outside of this function
...
la définition de struct list_head
de <linux/types.h>
est déjà inclus par <linux/list.h>
. Les deux sont à l'intérieur /lib/modules/3.0.0-16-generic/build/include