SFML community forums

Help => General => Topic started by: Prox112 on August 13, 2023, 10:50:35 am

Title: Trying to link SFML library gives error
Post by: Prox112 on August 13, 2023, 10:50:35 am
Using Windows 11, CLion with CMake, trying to use SFML 2.6 "GCC 13.1.0 MinGW (SEH) - 64-bit"

I also have MinGW installed on my drive.

In CMake, I've done it as a forum post here suggested:

set(SFML_DIR ".../NBPCPP/include/SFML-2.6.0/lib/cmake/SFML")

find_package(SFML COMPONENTS graphics window REQUIRED)

target_link_libraries(NBPCPP sfml-graphics sfml-window)

I have SFML, just as I downloaded it from the download page (but extracted), in my "include" folder.

I have tried running a simple script I got from GeeksForGeeks, just to test out if it works, and I get this:

Process finished with exit code -1073741515 (0xC0000135)

According to other forum posts here and google, this seems to be a dll related issue, but I can't pinpoint what it is.

Title: Re: Trying to link SFML library gives error
Post by: Thrasher on August 13, 2023, 08:04:59 pm
https://github.com/SFML/cmake-sfml-project

You'll have better luck using our official project template. It removes the need to download SFML and tell CMake where to find that installation. Just follow the instructions in the README.
Title: Re: Trying to link SFML library gives error
Post by: eXpl0it3r on August 14, 2023, 10:06:38 am
It means that you're missing a DLL next to your executable.

The easiest way to find out which ones, is to launch the exe from explorer, which will then tell you, what DLL is missing.