9
« on: December 24, 2010, 01:43:32 pm »
Hi,
I got the same thing, and now have working, thought this might help:
(ps my system: windows7 64-bit, VC++ Express 2008)
When using the dynamic libraries (sfml-window.lib or sfml-window-d.lib): the project compiles and runs, the console window appears, but get no application window, also when running it doesn't reach the main code (breakpoint on first line).
The static libraries worked (sfml-window-s.lib and sfml-window-s-d.lib). When compiling using the debug version, I got the warning "needs "vc90.pdb" for debug info", but seems to run fine, and have access to class debug info in debugger.
I also found my graphics card wasn't too keen on the hard coded videomode set-up in the example, so used the tutorial example to get a mode from the video card:
unsigned int VideoModesCount = sf::VideoMode::GetModesCount();
for (unsigned int i = 0; i < VideoModesCount; ++i)
{
sf::VideoMode Mode = sf::VideoMode::GetMode(i);
// Mode is a valid video mode
}
//sf::RenderWindow App(sf::VideoMode::GetMode(0), "SFML Shapes");
sf::RenderWindow App(sf::VideoMode::GetMode(0), "SFML Shapes", sf::Style::Fullscreen);
(+ you get full screen!)
If still having issues, recompile the libraries as described in tutorial 1 (open sfml.sln, change the configuration setting to desired build type in the main window tool bar, eg static debug (option box next to green run arrow), then right-click package you want to build in solution explorer window, clean the project then build libraries). New libraries can be found in lib\vc2008\, and copy them to the lib\ directory)
Hope this helps..