I have two files, main.o and modules.o, and I'm trying to compile them so that main.o can call functions in modules.o. I was explicitly told not to try #include module.o. I really don't know what I should be doing instead. I tried a few different versions of gcc (such as gcc -x c driver main.o modules.o), but nothing I get works: the compiler continuously returns
error: called object is not a function
The .o files are my source code files (I was instructed to put my source code in files with extension .o.) What do I do to compile this?
.ofiles? That seemed incredibly strange to me, especially sincegccdoesn't recognize.ofiles, but that's why I came to you guys!.ofiles, you can link them. Same goes for#include: it goes into.cfiles, not in.ofiles..ofiles are what.cfiles are often compiled into. You should not name your files with a.oextension if they contain C source code.