Ok, found part of the problem. I was trying to pass arguments by reference:
void getfield(int &field, int &x, int &y, int &fval);
Thought it was C99.
Part of all the confusion was that Pelles wasn't complaing when compiling
the program with a .cpp extension. Only when making, which gave the error
at the beginning of this topic.
As soon I add all those *'s to my variable names, I'll see what other errors I have.