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

Author Topic: Compiles fine, runs on XP, does not work on Win7  (Read 2941 times)

0 Members and 1 Guest are viewing this topic.

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Compiles fine, runs on XP, does not work on Win7
« on: September 09, 2013, 06:32:58 am »
After upgrading my computer to Windows 7, I'm having trouble getting anything SFML to work.  I started a project with SFML 1.6, so I'd like to stick with 1.6 for now.  I'm using CodeBlocks, and have followed the configuration procedure in the SFML docs.  Any SFML programs that I make, including a simple tutorial program like the following, will compile with no error but then hang up when running. 

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>

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

    // Start 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 the screen (fill it with black color)
        App.Clear();

        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}

The executable hangs up, with no explanation whatsoever.  No error dialog, nothing.  No SFML render windows open or anything.  This happens even with saved executables that ran fine on my old XP installation.  Given the absence of any error dialogs, I'm at a loss as to what is going on here.

Lambert

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Compiles fine, runs on XP, does not work on Win7
« Reply #1 on: September 09, 2013, 06:50:06 am »
I found something like this: http://cpp0x.pl/forum/temat/?id=4733
It's Polish forum so I will only say that guy had similar case - he used SFML 1.6 and it worked in Windows XP x86, but in Windows 7 x64 it hanged up without showing window. His solution was upgrading SFML to 2.0.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
AW: Compiles fine, runs on XP, does not work on Win7
« Reply #2 on: September 09, 2013, 10:50:57 am »
Do you have an AMD graphics card?
To me it sounds like the famous ATI bug, thus I suggest you stop using buggy, unmaintained and outdated SFML 1.6 now and start using SFML 2.1 which will bring a lot of new possibilities. ;)
It should be rather easy to adapt your project for SFML 2.1.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: AW: Compiles fine, runs on XP, does not work on Win7
« Reply #3 on: September 10, 2013, 08:51:39 am »
Do you have an AMD graphics card?
To me it sounds like the famous ATI bug, thus I suggest you stop using buggy, unmaintained and outdated SFML 1.6 now and start using SFML 2.1 which will bring a lot of new possibilities. ;)
It should be rather easy to adapt your project for SFML 2.1.

I do have an AMD card.  Is this really the only solution?  Rejigger my whole program to use 2.1 instead?  This is a pretty major problem with 1.6 if this is the case.  If 1.6 has such a major issue, that doesn't fill me with confidence in regards to SFML as a whole.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Compiles fine, runs on XP, does not work on Win7
« Reply #4 on: September 10, 2013, 08:58:01 am »
Quote
Is this really the only solution?  Rejigger my whole program to use 2.1 instead?
No, you can simply link statically.

Quote
If 1.6 has such a major issue, that doesn't fill me with confidence in regards to SFML as a whole.
Although SFML 1.6 was not perfect, this was mostly a driver issue.
Laurent Gomila - SFML developer

Gobbles

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Re: Compiles fine, runs on XP, does not work on Win7
« Reply #5 on: September 10, 2013, 10:34:45 pm »
... If 1.6 has such a major issue, that doesn't fill me with confidence in regards to SFML as a whole.

Your going to base your opinion of the current version of the library on an old outdated version that has since changed drastically?

Do you use this same mentality when playing games? And what about the games you are developing, do you want others to treat you the same way? "Vicker's first game kinda sucked, so I don't think I'm gonna touch this brand new one he put out. It may be a completely different thing, but that first one sure didn't fill me with confidence"

Actually speaking with some co-workers as I'm writing this, seems a lot more people then I previously thought think this way... too bad.

Vicker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Compiles fine, runs on XP, does not work on Win7
« Reply #6 on: September 11, 2013, 01:40:26 pm »
Quote
Is this really the only solution?  Rejigger my whole program to use 2.1 instead?
No, you can simply link statically.

Quote
If 1.6 has such a major issue, that doesn't fill me with confidence in regards to SFML as a whole.
Although SFML 1.6 was not perfect, this was mostly a driver issue.

Thank you very much for your reply, Laurent!  I've decided to switch over to 2.1.  I really love your library, so I hope I didn't come across as too negative.  Writing my goofy little game is full of enough headaches; I can't imagine how much work would be involved in creating something as massive as SFML.  My hat is off to you.

In any case, 2.1 seems to be working nicely on my machine.  Now I just need to reword some things in my program and I'll be happy as a clam.


... If 1.6 has such a major issue, that doesn't fill me with confidence in regards to SFML as a whole.

Your going to base your opinion of the current version of the library on an old outdated version that has since changed drastically?

Do you use this same mentality when playing games? And what about the games you are developing, do you want others to treat you the same way? "Vicker's first game kinda sucked, so I don't think I'm gonna touch this brand new one he put out. It may be a completely different thing, but that first one sure didn't fill me with confidence"

Actually speaking with some co-workers as I'm writing this, seems a lot more people then I previously thought think this way... too bad.

There's a difference between, "Vicker's first game sucked, so I won't touch his new one," and, "Vicker's first game sucked, so it makes me hesitant to try his new one."  I also didn't say anything about forming any kind of opinion.  I simply said it puts a dent in my opinion.  My overall opinion of SFML is still overwhelmingly positive.