0
我在AOP中工作,在Ubuntu虚拟框中使用AspeCt。我.acc
代码:预期声明说明错误?
before(): execution(int main(void)) {
printf("Before test successful!\n");
}
after(): execution(int main(void)) {
printf("world!\n");
}
before():
call(foo) {
printf("Before Foo!\n");
}
我.mc
代码:
void foo(void) {
printf("foo\n");
}
int main() {
printf("Hello everyone ");
foo();
return 0;
}
和错误消息:
1:13: error: expected declaration specifiers before ':' token
4:1: error : expected declaration specifiers before 'after'
7:1: error: expected declaration specifiers before 'before'
12:1 expected '{' at end of input
帮助吗?我很难决定如何解决这个问题!谢谢