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

Author Topic: [solved]SFML 2.2 VS2013, Cannot inherit sf::Drawable, while SFML 2.1 works fine  (Read 1860 times)

0 Members and 1 Guest are viewing this topic.

mzg147

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hello. I've encountered a strange problem while compiling my little test program, which was a try to create universal in-game window class, with text and buttons and stuff like that. So I created my class, inherited it from sf::Drawable, overrode virtual function "draw()" and tried to draw my window. Then, I've got this:
http://puu.sh/eGGu3/50b273c438.png
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
I searched for this error, and everyone who had the same thing was compiling SFML for themselves, from the source (using CMake and wrong calling conventions). I didn't do it, I just downloaded it from the official site, so I wonder if anyone have the same problem.
What's more, when I changed project to SFML 2.1, it built just fine. So maybe the official version is a little broken?
Maybe I haven't changed something when updating 2.1 to 2.2, so I just asking, is anyone have similar problem?
(click to show/hide)
« Last Edit: January 23, 2015, 10:10:43 pm by mzg147 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: SFML 2.2 VS2013, Cannot inherit sf::Drawable, while SFML 2.1 works fine
« Reply #1 on: January 18, 2015, 05:28:18 pm »
Can you provide a compilable and minimal example of your code that isn't working?
What's your exact version of VS 2013? Does it have updates?
Can you provide the full build command?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

mzg147

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML 2.2 VS2013, Cannot inherit sf::Drawable, while SFML 2.1 works fine
« Reply #2 on: January 18, 2015, 10:09:27 pm »
cl /c /I"C:\SFML\SFML-2.2\include" /ZI /W3 /WX- /sdl /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt main.cpp

Version: http://puu.sh/eHEDB/2f8b92705e.png
Dunno if this is up to date.

I posted a class that I was trying to draw using window.draw();

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: SFML 2.2 VS2013, Cannot inherit sf::Drawable, while SFML 2.1 works fine
« Reply #3 on: January 18, 2015, 10:23:14 pm »
cl /c /I"C:\SFML\SFML-2.2\include" /ZI /W3 /WX- /sdl /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt main.cpp
It's not the full build command, the linker part is missing.

Version: http://puu.sh/eHEDB/2f8b92705e.png
Dunno if this is up to date.
You're not on the latest version:


To upgrade, go to Tools -> Extensions and Updates... -> Updates

(click to show/hide)

I posted a class that I was trying to draw using window.draw();
It's not compilable and not complete, see here.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

mzg147

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML 2.2 VS2013, Cannot inherit sf::Drawable, while SFML 2.1 works fine
« Reply #4 on: January 23, 2015, 10:10:21 pm »
I resolved the problem - copying .dll files from SFML/bin helped.
I am sorry for my bad cooperation.

 

anything