Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Topics - Ancient Dragon

Pages: [1]
1
Window / Tutorial crashes
« on: September 26, 2010, 04:35:53 pm »
>> 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

Quote

Unhandled exception at 0x75a8f7cc in test8.exe: 0xC0000005: Access violation reading location 0x6e695720.


Here is the entire program
Code: [Select]

////////////////////////////////////////////////////////////
// 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;
}

Pages: [1]
anything