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

Author Topic: Trying to link SFML library gives error  (Read 413 times)

0 Members and 1 Guest are viewing this topic.

Prox112

  • Newbie
  • *
  • Posts: 1
    • View Profile
Trying to link SFML library gives error
« 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.


Thrasher

  • SFML Team
  • Jr. Member
  • *****
  • Posts: 53
    • View Profile
Re: Trying to link SFML library gives error
« Reply #1 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: Trying to link SFML library gives error
« Reply #2 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/