SFML community forums

Help => General => Topic started by: ophilbinbriscoe on September 12, 2016, 09:57:38 pm

Title: Access violation when trying to create an sf::RenderWindow
Post by: ophilbinbriscoe on September 12, 2016, 09:57:38 pm
Microsoft Visual Studio Community 2015 (14.0.24720.00 Update 1)

I am compiling / running in Debug, both the release and debug .dll's are in the working directory, where they need to be. I am referencing the sfml-***-d.lib's, and I am pointing to the D:\***\SFML-2.4.0\lib and D:\***\SFML-2.4.0\include directories in my project settings.

#include "stdio.h";
#include <iostream>;
#include <SFML/Graphics.hpp>;


int main ()
{
        sf::RenderWindow window( sf::VideoMode( 640, 480 ), "Title" );
        std::cin.get();
}
 

Executing this, I get the following exception on the first line (the one with the RenderWindow constructor).

Quote
Exception thrown at 0x56D5EEB6 (sfml-system-d-2.dll) in D20 RPG.exe: 0xC0000005: Access violation reading location 0xCCCCCCD8.

I am relatively new to c++, but I have successfully completed a few assignments in an intro course and a graphics course already (using GLFW, GLEW, GLM, etc.). I have followed the tutorial http://www.sfml-dev.org/tutorials/2.4/start-vc.php (http://www.sfml-dev.org/tutorials/2.4/start-vc.php) from start to finish two times now, each time starting from an empty Visual c++ project. The project compiles fine, and runs without any problems if I comment out the first line.

Any help is appreciated.
Title: Re: Access violation when trying to create an sf::RenderWindow
Post by: eXpl0it3r on September 13, 2016, 09:47:14 am
Where did you get the DLLs and libs from?
Title: Re: Access violation when trying to create an sf::RenderWindow
Post by: ophilbinbriscoe on September 13, 2016, 04:05:44 pm
The "Latest Stable Version" from http://www.sfml-dev.org/download.php (http://www.sfml-dev.org/download.php).
Title: AW: Access violation when trying to create an sf::RenderWindow
Post by: eXpl0it3r on September 13, 2016, 04:17:41 pm
Which package exactly?

Did you by any chance download the 64-bits package yet you're still using the 32-bits compiler?