SFML community forums
Help => General => Topic started by: zerox on January 29, 2009, 01:19:35 am
-
Hello everyone,
I recently took an interest in SFML for a project of mine, however, I am unable to get even the simplest looking tutorials to work.
The first tutorial that is only the console window outputting times with cout runs fine. However, if I try and do:
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
// Create the main window
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
// Start main loop
bool Running = true;
while (Running)
{
App.Display();
}
return EXIT_SUCCESS;
}
my program simply hangs in the console window with no output. I can't even seem to debug the code so I can't step through it. I tried adding cout statements at strategic places but it doesn't hit any even if it is the first statement. However, if I put JUST a cout statement in main and comment the rest out it runs fine and displays the output.
In my linker inputs I have:
sfml-system-d.lib sfml-graphics-d.lib sfml-window-d.lib
so I don't knwo why it won't even let me debug!
I also have as my pre-processor defines:
SFML_DYNAMIC;WIN32;NDEBUG;_CONSOLE
Linker SubSystem to Console and I can't really think of anything else so I'm a little bit frustrated at this point :oops: .
Any help would be greatly appreicated,
Zerox~
-
Do you have a USB joystick connected? If so, you can disconnect it and try again.
-
How bizzare, I unplugged them and it runs just fine. Displays the window and I can debug fine.
Is there some kind of more permanent workaround for this? And more to the point, what am I going to do about having my game use a joystick XD?
Thanks for your post though, straight to the point =).
-
It's a weird deadlock, which happens when I call Win32 joystick functions during the initialization phase.
I'm going to fix this soon.
-
Okay then, I will just leave my joypayds unplugged until I hear anything about a fix.
Thanks for taking the time to answer~
-
Someone submittted a patch to fix this:
http://orx-project.org/orx/SFML1.4-win32-deadlock.zip
You can use it until the "official" fix.
-
It's now also fixed in the latest SVN revision ;)