SFML community forums

Help => General => Topic started by: VCSMaster on January 11, 2020, 08:28:04 am

Title: SFML Project DLL entrypoint failure
Post by: VCSMaster on January 11, 2020, 08:28:04 am
Hello, I registered here after searching for a while to find the answer to this, but it doesn't seem many people have the same problem. Lucky them!

I'm writing a game in Code::Blocks using the latest version of both Code::Blocks and of SFML at the time of writing. I followed the tutorial and documentation, and when compiled and run from CB the program works flawlessly. Everything operates smoothly and properly as intended.

But... I can't get the EXE files to work. I know SFML must be installed correctly for everything to be working this well. Placing the EXE in a new folder with all DLL files and the few external resources it currently uses, it will not start.
Attempting to launch the file, it gives me a procedure entry point error for system, graphics, and window before closing.

I am on Windows 10, I have an Intel HD4000 video card (this is a laptop), I'm using the dynamic libraries if it wasn't clear, I am not using a snapshot version, and none of the relevant code seems to be an issue. As I said, it works fine in the IDE.

Any help is appreciated. Hope I did a good job with my first post.

Pictured below are some cropped screenshots I took to aide in understanding the problem. The first three are the errors I am getting, the fourth is the directory of the folder, and the fifth shows it running in Code::Blocks.
(https://cdn.discordapp.com/attachments/303395805253992448/665456249856589825/unknown.png)
(https://cdn.discordapp.com/attachments/303395805253992448/665456327564197928/unknown.png)
(https://cdn.discordapp.com/attachments/303395805253992448/665456386905473037/unknown.png)
(https://cdn.discordapp.com/attachments/303395805253992448/665452609557233664/unknown.png)
(https://cdn.discordapp.com/attachments/303395805253992448/665454696701362187/unknown.png)
Title: Re: SFML Project DLL entrypoint failure
Post by: eXpl0it3r on January 11, 2020, 05:12:27 pm
If you build your game with C++11 (or higher) enabled, you may need to rebuild SFML with that compiler flag enabled as well, due to different ABI for strings between pre and post C++11 in GCC.
Title: Re: SFML Project DLL entrypoint failure
Post by: VCSMaster on January 11, 2020, 10:59:22 pm
How do I do this in Code::Blocks?

I can't find anything about rebuilding it.

I also wouldn't be opposed to making changes to make it work in earlier versions of C++. Last time I did anything before this was in Visual Studio 2005, so I doubt I'm using many new features.
Title: Re: SFML Project DLL entrypoint failure
Post by: eXpl0it3r on January 12, 2020, 09:06:19 am
You use CMake to generate a makefile or C::B project and build SFML with it (see the CMake SFML tutorial).

Otherwise check your compiler flags.
Title: Re: SFML Project DLL entrypoint failure
Post by: VCSMaster on January 13, 2020, 08:38:56 pm
So I have to make a new project from scratch if I use CMake?

Is there another way which preserves my project?