So the thing is, compiler passes it without any warning or error BUT the screen shows up and crashes insantly. I did tried to change the definition of Board::draw() to Board::draw(sf::RenderWindow &window) and then pass a reference to my App window, and use window.draw() in board.cpp and then Board.draw(App) in main.cpp but still it didn't work. My friend tried to make a friend method in class sf::RenderWindow::draw() but with no succes either. So my question is, what am I doing wrong? I am using VS 2010 on Win 7 64b.