由 yogihuang » 週三 6月 15, 2011 4:23 pm
這樣似乎無法解決問題,
因為 /usr/src/linux-headers-2.6.26-2-xen-686 中的文件又連結到 /usr/src/linux-headers-2.6.26-2-common-xen/內的文件,
而我嘗試過用symbolic link的方式將需要include的檔案逐一建立"軟連結"(i.e. ln -s ), 但compile還是會有問題,
顯示錯誤, 例如:
In file included from /usr/include/linux/slab.h:12:0,
from /usr/include/linux/percpu.h:5,
from /usr/include/asm/local.h:4,
from /usr/include/linux/module.h:19,
from 0615_test.c:1:
/usr/include/linux/gfp.h:108:45: error: unknown type name ‘gfp_t’
/usr/include/linux/gfp.h:120:39: error: unknown type name ‘gfp_t’
/usr/include/linux/gfp.h:147:32: error: unknown type name ‘gfp_t’
/usr/include/linux/gfp.h:164:55: error: unknown type name ‘gfp_t’
/usr/include/linux/gfp.h:176:42: error: expected ‘)’ before ‘unsigned’
/usr/include/linux/gfp.h:179:31: error: expected ‘)’ before ‘unsigned’
/usr/include/linux/gfp.h:182:54: error: unknown type name ‘gfp_t’
/usr/include/linux/gfp.h:215:39: error: unknown type name ‘gfp_t’
/usr/include/linux/gfp.h:216:38: error: unknown type name ‘gfp_t’
透過 套件安裝方式下載 linux-headers-2.6.26-2-xen-686 (2.6.26-26lenny2) 套件, 是否還需要再重新編譯呢?