Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 25 Apr 2012
Offline Last Active May 06 2012 09:10 PM

Topics I've Started

Problems getting SFML to display a window.

30 April 2012 - 03:45 PM

I've been trying to get SFML to simply create an empty window with a color in it for more hours than I care to admit. I was working through the this tutorial, when I apparently hit a wall. I completed through part 2, everything compiles fine, no errors, but when I run it I just get a blank dos prompt when a blinking cursor that I have to force close. The only debug output is

The thread 'Win32 Thread' (0x520) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0x2c8) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0xe98) has exited with code -1073741510 (0xc000013a).
The program '[3700] Pang2.exe: Native' has exited with code -1073741510 (0xc000013a).

I've tried both vs2011 dev preview, and vs2008 express (too frustrated to install 2010 also...) and I get the exact same results. For vs2011 I compiled SFML myself, everything seemed to go fine there. In vs2008 I tried both the bundled DLLs and compiling my own, same result both times. Eventually I copy/pasted the code right from the tutorial, no luck. I even downloaded the "up to this point" project file from the tutorial, compiled it with no errors, black box, blinking cursor.

This code runs with no problems.
int main()
sf::Clock clock;
	while (clock.GetElapsedTime() < 5.0f)
	   std::cout <<clock.GetElapsedTime() << "\n";
	 return 0;

As soon as I try to create a sf::Window or sf::RenderWindow, it just hangs at the blinking cursor. This does not run.
int main()
sf::RenderWindow Window(sf::VideoMode VMode(800, 600, 32), "SFML Window");
  sf::Event Event;
  while (Window.GetEvent(Event))
   switch (Event.Type)
   case sf::Event::Closed:
return 0;

This also appears in the debug output...I don't know if any of it is bad.
'Pang2.exe': Loaded 'C:\Users\Zack\AppData\Local\Temp\ammemb.dll', Binary was not built with debug information.
'Pang2.exe': Unloaded 'C:\Windows\SysWOW64\atigktxx.dll'
'Pang2.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll'

In the "modules" menu, sfml-window-d.dll and sfml-system-d.dll and ammemb.dll all have a red ! and the tooltip says "The module did not load at the default load address". sfml-graphics-d is listed and does not have the same error. All three DLLs are in the same folder. It also reports "Symbols not loaded" for everything in the module list except for Pang2.exe and ammemb.dll ("symbols loaded", and "binary not built with debug information" respectively).

I'm completely at a loss. I've used freeglut before and had no problems creating a window and drawing to it. Am I missing some dependency for building the vs2011 DLLs? Should I try vs2010 also? I'm rather tired of installing software, my system feels so bloated lately.

I run win7 x64 on a core2duo 2.93ghz and a radeon 4870 hd; I updated the drivers this morning. Thanks to anybody that feels like they need a headach...err wants to help. If you need any other information just ask.

UPDATE: I added SFML_STATIC; to the C++ preprocessor, and used the static lib files (the ones with -s in the name) and now the I can make all sorts of multicolored windows in SFML 1.6 and 2.0. I'm still not sure of the original issue.