Name: Anonymous 2011-02-16 0:29
I'm working on my homework for a C++ class this week, which is mostly prepping a bunch of functions for a lame "game" we're building. Now I made all my functions but when I try to compile everything i'm getting linker errors. No one's ever really explained to me how headers and multiple source files are supposed to work, so could someone please crash me through this quickly?
Basically I have a main.cpp that calls out functions (right now just for testing), a function filled mess called game.cpp, and then a header for it (game.h). When I try to compile main I get a buncha "[Linker error] undefined reference to 'someFunction()" even though game.h is included. What else do I need?
Basically I have a main.cpp that calls out functions (right now just for testing), a function filled mess called game.cpp, and then a header for it (game.h). When I try to compile main I get a buncha "[Linker error] undefined reference to 'someFunction()" even though game.h is included. What else do I need?