SFML community forums

Bindings - other languages => DotNet => Topic started by: GanMatt on June 10, 2019, 08:39:35 pm

Title: Can't seem to get SFML C# running on Mac
Post by: GanMatt 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?
Title: Re: Can't seem to get SFML C# running on Mac
Post by: Balnian 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 (https://en.sfml-dev.org/forums/index.php?topic=24990.msg166468#msg166468)