>> sf::Window App(sf::VideoMode(640, 480, 32), "SFML Window");
That line crashes when compiled with vc++ 2010 Express in debug mode on 64-bit MS-Windows 7
Unhandled exception at 0x75a8f7cc in test8.exe: 0xC0000005: Access violation reading location 0x6e695720.
Here is the entire program
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>
#pragma comment(lib,"sfml-window-d.lib")
//#pragma comment(lib,"sfml-graphics-d.lib")
//#pragma comment(lib,"sfml-system-d.lib")
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
// Create the main window
sf::Window App(sf::VideoMode(640, 480, 32), "SFML Window");
// Start the game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
// Escape key : exit
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
}
// Set the active window before using OpenGL commands
// It's useless here because the active window is always the same,
// but don't forget it if you use multiple windows
App.SetActive();
// Clear color and depth buffer
// Finally, display the rendered frame on screen
App.Display();
}
return EXIT_SUCCESS;
}