SFML community forums

Help => General => Topic started by: Noktai on December 28, 2011, 09:07:04 pm

Title: Error in WglContext when trying to open a window
Post by: Noktai on December 28, 2011, 09:07:04 pm
Hello,

I've been trying to start c++ the last couple of days. After many problems I finally managed to even access the sfml library. However, I'm getting an error on the very first line of my test program.

Code: [Select]
First-chance exception at 0x6903b212 in SFML_TEST.exe: 0xC0000005: Access violation reading location 0x00000008.

Here is the source code :

Code: [Select]
#include <iostream>
#include <SFML\Window.hpp>
#include <SFML\Graphics.hpp>




int main()
{
sf::RenderWindow Game(sf::VideoMode(800, 600), "SFML Window");
/*sf::Event Event;

while(Game.IsOpened())
{
while(Game.PollEvent(Event))
{
switch(Event.Type)
{
case sf::Event::Closed:
Game.Close();
break;
}
}

Game.Display();
}*/

return 0;
}


(http://img210.imageshack.us/img210/4870/sfml.png) (http://imageshack.us/photo/my-images/210/sfml.png/)

I did fiddle around alot with visual studio to get the SFML library to work, I'm getting a lot of " Cannot find or open the PDB file" messages in the output. I've reinstalled a couple of times but I do notice that some settings are not reset.

This exact same project works perfectly on my work pc btw :/
Title: Error in WglContext when trying to open a window
Post by: Laurent on December 28, 2011, 09:35:10 pm
You must recompile SFML, the VC2008 libraries are not compatible with VC2010.

And please don't ask "how?", find one of the million topics about this issue on the forum ;)
Title: Error in WglContext when trying to open a window
Post by: Noktai on December 28, 2011, 10:53:34 pm
I did recompile them, thats what I mean with the " I finally managed to even access the sfml library"part. Should have noted more clearly though, sorry.

I did a wide search on the forums, but never found a problem with that specific line in the WglContext class.