1
General / Make some sfml objects as static
« on: December 01, 2010, 12:31:38 am »
Always post error messages, "i get some erros" is not very helpful.
I'm assuming you're getting linker errors.
I think you want something like this:
I'm assuming you're getting linker errors.
I think you want something like this:
Code: [Select]
//GameObjects.hpp
class GameObjects
{
private:
static sf::RenderWindow myApp;
};
//GameObjects.cpp
sf::RenderWindow GameObjects::myApp(sf::VideoMode(800, 600, 32), "SFML Graphics");