SFML Window title

Dec 1, 2012 at 4:55pm
Hey, I have managed to get a window open using SFML. However when I set the title of the window it is not displayed correctly.

Here is my class:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Game
{
public:
	static void start();
private:
	static bool End();
	static void Loop();

	enum GameState {Unitialised, ShowingMenu, Playing, Finishing};

	static GameState _gameState;
	static sf::RenderWindow _mainWindow;
protected:
};


Here is the game start function

1
2
3
4
5
6
7
8
9
10
11
12
13
void Game::start()
{
	if (_gameState!= Unitialised)
		return;
	_mainWindow.create(sf::VideoMode(1024,768,32),"SFML");
	_gameState = Game::Playing;

	while (!End())
	{
		Loop();
	}
	_mainWindow.close();
}


instead if saying SFML in the title it displays '..i where the "." are raised to the same level as " ' ".

I am using this documentation - http://www.sfml-dev.org/tutorials/2.0/window-window.php

Following this tutorial - http://www.gamefromscratch.com/page/Game-from-Scratch-CPP-Edition-Part-2.aspx

The tutorial is for 1.6 and I have compiled the 2.0 source. When it comes to making a window the documentation is the same.
Dec 1, 2012 at 5:17pm
Make sure you're using the appropriate libraries for your build (debug library for debug build, release library for release build.) The debug libraries end with a 'd' (eg. sfml-system-d.lib)
Dec 1, 2012 at 6:20pm
Thanks that worked. Had no idea that there was much of a difference between release and debug.
Topic archived. No new replies allowed.