Question

I'm learning about AOP in C, using aspeCt as a compiler. The problem I'm having is that when I'm compiling, I keep getting the error line 2 error--1: syntax error near token '' from my .acc file.

I'm assuming that this is because of the before function in my .acc file. Is there a library that I should be importing? Or am I completely wrong here? Code:

#include <stdio.h>

before():execution(int main()) {

printf("Before test successful!\n");

}

after(): execution(int main()) {

printf("world!\n");

}
Was it helpful?

Solution

Fixed it, I had to compile with gcc first, save those files as .acc and .mc files, and then compile those with ACC, then compile them together AGAIN with gcc. Run with ./a.out, done.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top