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

Author Topic: Error in WglContext when trying to open a window  (Read 1069 times)

0 Members and 1 Guest are viewing this topic.

Noktai

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error in WglContext when trying to open a window
« 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;
}




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 :/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error in WglContext when trying to open a window
« Reply #1 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 ;)
Laurent Gomila - SFML developer

Noktai

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error in WglContext when trying to open a window
« Reply #2 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.