SFML community forums
Help => General => Topic started by: gordon13 on December 27, 2015, 10:12:14 pm
-
Hi, I'm having an issue running the code in this tutorial:
http://www.sfml-dev.org/tutorials/2.0/start-cb.php
It compiles fine. The project is dynamically linked so I copied the dlls to the root of the project (as shown on many video tutorials. CodeBlocks is able to run the resulting exe with the correct context) but I get the following message in an error window when running the exe:
The procedure entry point _ZSt24__throw_out_of_range_fmtPKcz could not be located in the dynamic library C:\...\sfml-system-d-2.dll
I also tried copying the dlls in the \bin\Debug directory where the debug exe is created. The same error happens.
I've seen a number of people having the same issue and it seems to be something to do with the dlls since the project itself compiled. I'm pretty sure they're the correct dlls because I got them from same package the SFML package (as described in the tutorial)
My last resort would be to compile SFML myself but I'd like to avoid that if possible.
Any ideas?
Some more details about my setup:
SFML GCC 4.9.2 MinGW (DW2) 32bit
Code Blocks 13.12 MinGW (NOT the TDM GCC version)
Windows 10
Project is dynamically linked and the dlls are placed in the project root and where the exe is located.
-
Sorry if I'm answering my own post, but out of curiosity I tried compiling SFML. It was surprisingly easy! And better yet, the exe works perfectly now!
So my question is, why do the dlls that come with SFML not work? The tutorial tells you to take the dlls from the SFML install folder so that's what I did but clearly that didn't work.
Do the instructions assume that you compiled SFML yourself? If so, I really think it should be made clearer.
-
If the DLLs don't work, there is a configuration mismatch between them and your setup. Most probably, they have been built with another compiler (different version or compiler settings is enough to make them incompatible).
-
Thanks for the clarification.
-
I also encountered this, so I'm glad the topic was available to browse.
It came up after updating my IDE (CodeBlocks) to the latest, which seemed to also update the compiler version.
'Going through the steps to get the dll to match the compiler again. (perhaps to compile SFML, see if just grabbing latest SFML release will be enough)