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

Author Topic: SFML Project Won't Build/Run  (Read 1833 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
SFML Project Won't Build/Run
« on: October 30, 2021, 07:12:33 pm »
Hello Guys,

I am having some issues with SFML.  I am working in CLion (CMake) on Windows.  I have used SFML in the past on a Linux machine with little to no problems.  Now I am having major issues. 

I have written a state machine and an asset manager for SFML and I am to a point where I have testable code.  When I went to build I had issues with the build process.  My initial response was the download the appropriate version of GCC and install it to match and then download the right version of SFML.  This go me past the build issues but when I attempted to run the executable it fails stating that I am missing libraries.  Some of them are SFML libraries and others are GCC libraries. 

sfml-xxx-d-2.dll for audio and so on.

I couldn't really figure out why it was missing these libraries so after a few frustrating hours I just dropped them in the debug folder with the executable.  This seemed to resolve that problem.  When I attempted to run the program again I get another error saying the program failed to start 0xc000007b. 

At first, I thought it might be my code so I attempted to debug by placing a breakpoint at the beginning of main but, the error appears before any of my code executes.  (Which I should have known by the words failed to start lol). 

I figured it must be something with my build tools because, things had never quite worked right.  So I went ahead and decided to build SFML libraries from the repo so that the build tools between the libs and the project would match.   Now I am getting a CMake error:

CMake Error at CMakeLists.txt:11 (find_package):
  Could not find a configuration file for package "SFML" that is compatible
  with requested version "2.5".

  The following configuration files were considered but not accepted:

    C:/Libraries/SFML-2.5.1/lib/cmake/SFML/SFMLConfig.cmake, version: 2.5.1 (64bit)

mingw32-make.exe: *** [cmake_check_build_system] Error 1

Can anyone help me with this process?  I am in SFMHELL right now lol. 



  • SFML Team
  • Hero Member
  • *****
  • Posts: 10044
    • View Profile
    • development blog
    • Email
Re: SFML Project Won't Build/Run
« Reply #1 on: October 30, 2021, 10:42:51 pm »
Yes, you need to copy the needed DLLs next to your executable.
What now happened is that you probably copied the wrong set of DLLs next to your executable.
You need to make sure that if you compile as x86 or x64 that the corresponding SFML DLL were also compiled for x86 or x64.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/


  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: SFML Project Won't Build/Run
« Reply #2 on: October 30, 2021, 11:32:59 pm »
Thanks for your help.