[SOLVED] SFML window not showing

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

[SOLVED] SFML window not showing

Post by like80ninjas »

I re-edited this to appeal to people who need help with the issue, or are google searching as it was very hard to figure out.
Apparently there are issues with SFML right now with certain new graphics card drivers on both Radeon and Nvidia cards.
This issue is fixed by switching to the statically linked version of the library, rather than using the dynamic version.
I don't know the ups and downs of static/dynamic linking, but my window shows up fine now when compiling statically.
Last edited by like80ninjas on Wed Apr 27, 2011 4:04 pm, edited 1 time in total.
X Abstract X
Chaos Rift Regular
Chaos Rift Regular
Posts: 173
Joined: Thu Feb 11, 2010 9:46 pm

Re: Weird SFML issue. REALLY need help.

Post by X Abstract X »

That code runs perfectly fine for me :S
like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

Re: Weird SFML issue. REALLY need help.

Post by like80ninjas »

Yeah, i've tried to look this up and only found one thread in a random forum where someone had a similar issue, but the people in the thread wrote it off as "64bit windows 7"'s fault.

I don't have windows seven, nor is my pc 64bit. 32 bit vista.

I also heard while searching that it could be an issue with VC2010, but I tried 2008 and I get the same issue. I've tried making new projects as well. It all compiles and runs but all that comes up is a blank console window, that's it.
X Abstract X
Chaos Rift Regular
Chaos Rift Regular
Posts: 173
Joined: Thu Feb 11, 2010 9:46 pm

Re: Weird SFML issue. REALLY need help.

Post by X Abstract X »

Well, I'm running win7 64-bit so that's not an issue. You said:
like80ninjas wrote:Even if I add cout before the SFML stuff it just opens a blank console window and hangs there.
Does the program exit successfully if you immediately return from your main function before doing anything?
like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

Re: Weird SFML issue. REALLY need help.

Post by like80ninjas »

Well it doesn't exit on it's own. With the code I posted, no keys will work (escape should close it) but when you 'x' out the console window it hangs for maybe 10 seconds(looks like it freezes) and then returns 0 (success).
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

Re: [SOLVED] SFML window not showing

Post by short »

like80ninjas wrote:I re-edited this to appeal to people who need help with the issue, or are google searching as it was very hard to figure out.
Apparently there are issues with SFML right now with certain new graphics card drivers on both Radeon and Nvidia cards.
This issue is fixed by switching to the statically linked version of the library, rather than using the dynamic version.
I don't know the ups and downs of static/dynamic linking, but my window shows up fine now when compiling statically.

http://www.learncpp.com/cpp-tutorial/a1 ... libraries/
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
Post Reply