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

Author Topic: SFML examples incompatible to dlls  (Read 1733 times)

0 Members and 1 Guest are viewing this topic.

binomial0

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML examples incompatible to dlls
« on: June 22, 2016, 12:34:48 pm »
Hello,

I was trying to compile SFML myself, but my binaries were always incompatible to the SFML dlls.
Finally, I compiled the SFML examples, only to find that even they are incompatible. That's really weird, because they were compiled in one go with the dlls, which should guarantee that the same compiler and configuration was used.
Can anyone help me finding out what causes that problem, thus hopefully getting my actual project to work?

Thank you

Technical details: Win10 Pro x64, SFML 2.3.2, MinGW gcc 4.9.3, cmake 3.6.0-rc2, in PATH: MinGW/bin; cmake/bin; sfml/bin (with dlls), tried both static and dynamic sfml builds (neither works)
Error when linking statically: Procedure entry point "_ZSt24__throw_out_of_range_fmtPKcz" not found in the dll "C:\Program Files (x68)\SFML\examples\pong\pong-d.exe"
Error when linking dynamically: Procedure entry point "_ZSt24__throw_out_of_range_fmtPKcz" not found in the dll "C:\Program Files (x68)\SFML\bin\sfml-system-d-2.dll"
« Last Edit: June 22, 2016, 12:41:37 pm by binomial0 »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: SFML examples incompatible to dlls
« Reply #1 on: June 22, 2016, 06:59:56 pm »
Any chance you're compiling with gcc rather than g++?

binomial0

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML examples incompatible to dlls
« Reply #2 on: June 22, 2016, 07:24:09 pm »
No, because compiling still works when I remove the gcc binary. Apart from that, this shouldn't be an issue because I only use cmake and mingw32-make directly, so they should automatically invoke the right compiler.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: SFML examples incompatible to dlls
« Reply #3 on: June 22, 2016, 09:18:15 pm »
It's an error when trying to load the symbols from the DLL, this means that your application and the libraries aren't compatible.

Did you copy the right DLLs to the right place? Are there other DLLs in PATH?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

binomial0

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML examples incompatible to dlls
« Reply #4 on: June 22, 2016, 11:18:15 pm »
I am pretty sure I handled the dlls correctly. However, I just tried to link the examples statically (pretty sure I tried it before), and now it worked... I still find this pretty strange, but I assume it was some stupid error on my side. Sorry for that, and thanks for all the kind support! (You really eased the frustration I experienced before...)

As a summary for those who share my problem: in cmake-gui, uncheck BUILD_SHARED_LIBS, and check SFML_USE_STATIC_STD_LIBS. This got the examples working on my machine.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML examples incompatible to dlls
« Reply #5 on: June 22, 2016, 11:41:26 pm »
Quote
uncheck BUILD_SHARED_LIBS, and check SFML_USE_STATIC_STD_LIBS
Are both really needed?
Laurent Gomila - SFML developer