Frage

I'm working in AOP, using AspeCt in an Ubuntu virtual box. My .acc code:

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");

}

My .mc code:

void foo(void) {

printf("foo\n");

}

int main() {

printf("Hello everyone ");
foo();
return 0;

}

And the error messages:

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

Help please? I'm stumped on how to fix this! Thank you

War es hilfreich?

Lösung

Fixed this, you need to pre-process the files with gcc in a Linux environment, saving them as .acc and .mc files respectively. Then you need to run them through acc together, and the resulting .c files through gcc again. ./a.out and you're done.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top