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

Author Topic: Access violation when trying to create an sf::RenderWindow  (Read 1624 times)

0 Members and 2 Guests are viewing this topic.

ophilbinbriscoe

  • Newbie
  • *
  • Posts: 2
    • View Profile
Access violation when trying to create an sf::RenderWindow
« 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 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Access violation when trying to create an sf::RenderWindow
« Reply #1 on: September 13, 2016, 09:47:14 am »
Where did you get the DLLs and libs from?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ophilbinbriscoe

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Access violation when trying to create an sf::RenderWindow
« Reply #2 on: September 13, 2016, 04:05:44 pm »
The "Latest Stable Version" from http://www.sfml-dev.org/download.php.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: Access violation when trying to create an sf::RenderWindow
« Reply #3 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?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/