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

Author Topic: Access violation creating the window  (Read 5620 times)

0 Members and 2 Guests are viewing this topic.

Juanxo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Access violation creating the window
« on: May 06, 2010, 02:18:51 am »
Hi all:

I'm doing some tests with SFML, and i have an error:

Unhandled exception at 0x7549f7cc in Mesh_Transformd.exe: 0xC0000005: Access violation reading location 0xcccc004f.

the app is this:

Code: [Select]

#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>

int main(int argc, char** argv)
{
sf::Window window(sf::VideoMode(800,600), "HELLO");
return 0;
}


It happens only in the debug build.

PS: Im using SFML 1.6 and VS 2010 Pro

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Access violation creating the window
« Reply #1 on: May 06, 2010, 07:27:38 am »
You must link to the debug libraries ("-d" suffix) when compiling in debug mode.
Laurent Gomila - SFML developer

Juanxo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Access violation creating the window
« Reply #2 on: May 06, 2010, 01:33:07 pm »
Sorry, i forgot to tell it.

This is my input in the linker box:

$(ExtLibs)Lib\SFML\SFML-main-d.lib
$(ExtLibs)Lib\SFML\SFML-window-d.lib
$(ExtLibs)Lib\SFML\SFML-system-d.lib
$(ExtLibs)Lib\SFML\SFML-graphics-d.lib
OpenGL32.lib
GLu32.lib
$(ExtLibs)Lib\Assimp\debug\assimp.lib

And the app is Multi-threaded DLL debug

Mindiell

  • Hero Member
  • *****
  • Posts: 1261
    • ICQ Messenger - 41484135
    • View Profile
Access violation creating the window
« Reply #3 on: May 06, 2010, 01:53:47 pm »
Did you recompile SFML with VS 2010 ?
Mindiell
----

Juanxo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Access violation creating the window
« Reply #4 on: May 06, 2010, 02:27:18 pm »
i have tried it, but i get some errors about _ITERATOR_DEBUG_LEVEL or something similar

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Access violation creating the window
« Reply #5 on: May 06, 2010, 02:30:08 pm »
Quote
i have tried it, but i get some errors about _ITERATOR_DEBUG_LEVEL or something similar

Which doesn't mean that this is the wrong solution ;)
Tell us more about this error, so that we can help you fix it.
Laurent Gomila - SFML developer

ryandaniels

  • Newbie
  • *
  • Posts: 3
    • View Profile
Access violation creating the window
« Reply #6 on: May 06, 2010, 06:34:47 pm »
I have the same problem, only I have recompiled with 2010.

Juanxo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Access violation creating the window
« Reply #7 on: May 07, 2010, 09:00:53 am »
when i tried to rebuild all libs with batch build, i get this error in some of them:

sfml-window-s-d.lib(Context.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in Color.obj

sfml-system-s-d.lib(Thread.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in AudioDevice.obj

Quote
Which doesn't mean that this is the wrong solution


sorry, i didn't want to say that

Juanxo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Access violation creating the window
« Reply #8 on: May 10, 2010, 03:13:19 am »
has anyone got the libs compilled for vs 2010?

 

anything