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.


Messages - varreon

Pages: [1]
1
General / Codeblocks, gcc4.4 Crashes
« on: July 21, 2010, 08:27:25 am »
I just followed the tutorial for setting up sfml here: http://www.sfml-dev.org/tutorials/1.6/start-cb.php. I replaced my mingw folder with the files linked on the tutorial.

The code compiles, but crashes immediately after running. I'm not sure if it is relevant, but I am running XP SP 3.
Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Image Image;
    if (!Image.LoadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite Sprite(Image);

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

        // Clear screen
        App.Clear();

        // Draw the sprite
        App.Draw(Sprite);

        // Update the window
        App.Display();
    }

    return EXIT_SUCCESS;
}


Though I dont think it is related to this bug, I've noticed another strange quirk with sfml. Even though I set my link options to the debug dlls, the application will not run unless it finds the release dlls.

Pages: [1]