SFML Problem

Hi everyone! I am new the these forums, and I think I have a problem. I am using Microsoft Visual Studio 2012 Ultimate edition, and SFML 2.0 RC, and when I compile I get the following error(s):
1
2
First-chance exception at 0x612076A9 (sfml-graphics-2.dll) in TextTest.exe: 0xC0000005: Access violation reading location 0x42200008.
Unhandled exception at 0x612076A9 (sfml-graphics-2.dll) in TextTest.exe: 0xC0000005: Access violation reading location 0x42200008.


This happens right here:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
bool Engine::invoke(int screenwidth, int screenheight)
{
	// Initialize all the variables/things you normally would have to do
	sf::Color rect2color(0, 0, 255, 255);
	sf::Color rect3color(0, 0, 255, 200);
	rect1.setPosition(0, 0);
	rect1.setFillColor(sf::Color::Red);
	rect1.setSize(sf::Vector2f(40, 40));
	rect2.setPosition(0, 0);
	rect2.setFillColor(rect2color);
	rect2.setSize(sf::Vector2f(400, 300));
	rect3.setFillColor(rect3color); /* <--- It says  'This is the next statement to execute when this thread ret
urns from the current function.*/
	rect3.setSize(sf::Vector2f(400, 20));
	rect3.setPosition(0, 0);
	moveSpeed = 7;
	engineDebug.invoke("engine_debug.txt", true);
	mainWindow.create(sf::VideoMode(screenwidth, screenheight), getVerNumber());
	mainWindow.setVerticalSyncEnabled(true);
	// Start Main Loop
	mainLoop();
	return true;
}


Any help is appreciated! I will post the rest of my code if needed! Just let me know!
Last edited on
The 2.0 RC was not compiled with VC++11. You're using VC++11. You need to recompile the SFML libraries. Getting the latest source from github is advised.

If you're not confident in doing that, visit http://en.sfml-dev.org/forums/index.php?topic=9513.0
@cire
Hmm... I'll try doing that. Thanks for the reply!
@cire
Thank you very much! Solved my problem! (I think one of the .DLLs were faulty)
Topic archived. No new replies allowed.