Devc++_Allegro_HeaderFiles

Im using allegro, and im trying to add a header file to my code, but i get errors such as: [Linker Error] undefined reference to System::System() or [Linker Error] undefined reference to System::~System()

This is the main.cpp:


#include <Allegro.h>
#include "System.h"

int main(){

System system;

system.Setup();

BITMAP *buffer = create_bitmap( 640, 480 );
while ( !key[KEY_ESC] )
{
rectfill( buffer, 0, 0, 640, 480, makecol( 0, 0, 255 ) );
blit ( buffer, screen, 0, 0, 0, 0, 640, 480 );
clear_bitmap( buffer );
}
destroy_bitmap( buffer );
return 0;
}
END_OF_MAIN();



And this is the header file:




class System
{
private:
int screenWidth, screenHeight;
bool fullscreen;
public:
System();
~System();
void Setup();
};
void System::Setup()
{
allegro_init();
install_keyboard();
install_timer();
set_color_depth ( 16 );
fullscreen = false;
if ( fullscreen == true )
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
else
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
}




They are both in the same directory, but i don't know much about header files, can anyone tell me whats wrong with my code?
This won't help much but word of advice: Don't use Dev-C++, it hasn't been updated in five years or so. It lacks some great features that other IDEs today have, such as Code::Blocks and Microsoft Visual Studio.
Well, anybody using DevC++ knows how i can solve this?
Where's System.cpp with the definitions of System() and ~System()? Also move Setup() to it, header files aren't supposed to keep non inlined function definitions.
Topic archived. No new replies allowed.