1
Window / Tutorial crashes
« on: September 27, 2010, 02:56:25 pm »Quote from: "OniLink10"
Uncomment the pragma for sfml-system-d
Thanks for the suggestion, but it didn't help.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Uncomment the pragma for sfml-system-d
Unhandled exception at 0x75a8f7cc in test8.exe: 0xC0000005: Access violation reading location 0x6e695720.
////////////////////////////////////////////////////////////
// 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;
}