DarkAmbient
August 14th, 2010, 02:46 PM
Heya, I just started to program again on an old project of mine.
Last time i coded on (my to be a 2D game using SDL) it worked fine i remember.
I hav'nt been programming in C++ for a long time, only some PHP.. so I'm kinda rusty with C++ as of now.
Anyway, the outputs i get from compiling with
g++ -o pagan_test main.cpp -lSDL
is
main.cpp:(.text+0x16): undefined reference to `CGame::CGame()'
main.cpp:(.text+0x5e): undefined reference to `CGame::initialize(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.cpp:(.text+0xc4): undefined reference to `CGame::run()'
main.cpp:(.text+0xd5): undefined reference to `CGame::~CGame()'
main.cpp:(.text+0xf3): undefined reference to `CGame::~CGame()'
collect2: ld returned 1 exit status
The main.cpp and game header looks like this.
main.cpp:
- wiped clean -
game.h
- wiped clean -
The game header has a cpp file aswell* But dont think i need to print out more than (even if) that?
As I said, I hav'nt been coding in C++ for a while now.
So please, anyone got a clue? Could it be my inexperience with compiling in linux that causes this??
If that's the case then I'll remove this, readup some more and apologize myself :o
Last time i coded on (my to be a 2D game using SDL) it worked fine i remember.
I hav'nt been programming in C++ for a long time, only some PHP.. so I'm kinda rusty with C++ as of now.
Anyway, the outputs i get from compiling with
g++ -o pagan_test main.cpp -lSDL
is
main.cpp:(.text+0x16): undefined reference to `CGame::CGame()'
main.cpp:(.text+0x5e): undefined reference to `CGame::initialize(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.cpp:(.text+0xc4): undefined reference to `CGame::run()'
main.cpp:(.text+0xd5): undefined reference to `CGame::~CGame()'
main.cpp:(.text+0xf3): undefined reference to `CGame::~CGame()'
collect2: ld returned 1 exit status
The main.cpp and game header looks like this.
main.cpp:
- wiped clean -
game.h
- wiped clean -
The game header has a cpp file aswell* But dont think i need to print out more than (even if) that?
As I said, I hav'nt been coding in C++ for a while now.
So please, anyone got a clue? Could it be my inexperience with compiling in linux that causes this??
If that's the case then I'll remove this, readup some more and apologize myself :o