我想在Ubuntu 12.04.1中進行系統調用。我試圖在Ubuntu 12.04.1中進行系統調用。我遇到了一個錯誤編譯我的hello.c文件
#include <linux/kernel.h>
asmlinkage long sys_hello(void) {
printk("hello world\n");
return 0;
}
它顯示了錯誤:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’ asmlinkage long sys_hello(void)
「問題」與問題描述有點相似... – fvu
您有「問題」。你有什麼問題?任何特定的錯誤消息?你的代碼是否會喚起離開者的邪惡哀傷? –
error:expected'=',',',';','asm'或'__attribute__'before'long' asmlinkage long sys_hello(void) ^ ~~~ @RobertColumbia –