我想在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 –