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

Author Topic: Getting SFML program to work  (Read 2491 times)

0 Members and 1 Guest are viewing this topic.

hobbyProgrammer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Getting SFML program to work
« on: February 05, 2016, 08:10:39 pm »
Although I followed as best I could the convoluted setup procedure to use SFML and Code::Blocks I was unable to get the demo code in the tutorial to compile. Seeking help in the Beginners C++ forum,
http://www.cplusplus.com/forum/beginner/183826/
I was unable to resolve the issue as the "help" was even more confusing.
Anyway what is wrong with the tutorial even if I understood to do all these extra things to make it work?
I ended up downloading an the older version SFML 2.0 and tried to use the SFML projects icon with this result,

It had a different set of items,
sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d
sfml-main-d
Which wouldn't compile so I changed them to,
sfml-graphics
sfml-window
sfml-system
sfml-main
When the program compiled and ran it gave a console screen with a pop up error window,
"The procedure entry point_gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll"
Which was of no help as it didn't say what to do about it which is the problem with all these error messages.
I had chosen SFML_STATIC so it makes no sense to me.

Is it the SFML team or Code::Blocks team that make these automatic project things?

I have no trouble creating Console based programs. That all works fine without all this complexity.

Thank you for any suggestions.


paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: Getting SFML program to work
« Reply #1 on: February 05, 2016, 09:31:17 pm »
I believe that this is your solution:
http://stackoverflow.com/questions/6404636/libstdc-6-dll-not-found

Also I would recommend you to use latest SFML version.

The easiest way is to install Ubuntu 14.04 alongside Windows for programming. (my approach after I had tons of problems when I tried to use Ogre (before I've realised that its just a graphics engine))

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Getting SFML program to work
« Reply #2 on: February 05, 2016, 09:39:34 pm »


I believe that this is your solution:
http://stackoverflow.com/questions/6404636/libstdc-6-dll-not-found
Not really.

The easiest way is to install Ubuntu 14.04 alongside Windows for programming.
That's a terrible suggestions and by no means a solution.

The problem you're experiencing is that the runtime libraries don't match 100%. The most common cause for this is when you use a different compiler than the one the SFML package you use was built with.

The easiest solution is simply to rebuild SFML from source with your compiler. That way everything is guaranteed to match.

Otherwise you either need to change your compiler to match the SFML package or the other way around.

Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kokyett

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Getting SFML program to work
« Reply #3 on: February 05, 2016, 10:04:28 pm »
This problem sounds familiar to me. I wanted to use the tdm-gcc 5.1.0. So I've decided to download tdm but not tdm64 files. I've download sjlj and dw2 files and I've extracted all of them in the same directory. This mix made a problem similar to yours. Finaly I've reinstalled only sjlj files.

 

anything