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

Author Topic: Can't seem to get SFML C# running on Mac  (Read 5168 times)

0 Members and 1 Guest are viewing this topic.

GanMatt

  • Newbie
  • *
  • Posts: 1
    • View Profile
Can't seem to get SFML C# running on Mac
« on: June 10, 2019, 08:39:35 pm »
I got the error shown in this screenshot when I made a new C# project and added SFML.net.
Any idea how to fix this?
« Last Edit: June 10, 2019, 08:45:24 pm by GanMatt »

Balnian

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Can't seem to get SFML C# running on Mac
« Reply #1 on: June 14, 2019, 05:27:12 pm »
Make sure csfml-graphics.dylib is copied to the output directory (beside your main executable) it should be automatic from the nuget package.
I know for a fact that on linux there's a similar problem but it's based on how the system search for shared libraries, the default location doesn't include what's beside the executable.
Just for the record, on linux you can either do :
export LD_LIBRARY_PATH="your/app/path/"

LD_LIBRARY_PATH is not recommended for production, only for dev.
For prod you should install the good versions of the csfml libs from your package manager, or copy the ones that are beside the executable to one of the system default libraries folders

So check that the lib are there, and I think I saw something similar to LD_LIBRARY_PATH for mac
Edit:
Found this forum post that should fix your problem
https://en.sfml-dev.org/forums/index.php?topic=24990.msg166468#msg166468
« Last Edit: June 14, 2019, 06:11:38 pm by Balnian »