I have decided to make my own game engine using SFML (2.0) however i can't get far because i am getting several Multiple Definitions Errors. I have checked and i can't find any more definitions of the functions so could you please help.
main.cpp
1 2 3 4 5 6 7 8 9
#include "Media/Code/Game.cpp"
int main()
{
Game game;
game.run();
return 0;
}
obj\Debug\Media\Code\Game.o||In function `ZN4GameC2Ev':|
Game Engine\Media\Code\Game.cpp|3|multiple definition of `Game::Game()'|
obj\Debug\main.o:Game Engine\Media\Code\Game.cpp|3|first defined here|
obj\Debug\Media\Code\Game.o||In function `ZN4GameC2Ev':|
Game Engine\Media\Code\Game.cpp|3|multiple definition of `Game::Game()'|
obj\Debug\main.o:Game Engine\Media\Code\Game.cpp|3|first defined here|
obj\Debug\Media\Code\Game.o||In function `ZN4Game3runEv':|
Game Engine\Media\Code\Game.cpp|9|multiple definition of `Game::run()'|
obj\Debug\main.o:Game Engine\Media\Code\Game.cpp|9|first defined here|
obj\Debug\main.o:main.cpp|| undefined reference to `sf::Music::Music()'|
obj\Debug\main.o:main.cpp:(.text$_ZN4GameD1Ev[__ZN4GameD1Ev]+0x4a)||undefined reference to `sf::Music::~Music()'|
obj\Debug\Media\Code\Game.o:Game.cpp|| undefined reference to `sf::Music::Music()'|