I was pretty excited about the migration to .NET Core (/standard?), and now I can build on any OS perfectly, which is fantastic as I can run CI on Linux now, but as soon as I try to actually run anything linking to SFML, the runtime linking fails on MacOS and Linux. This is true of examples, my own project, and a test project I set up to try to diagnose with a minimal example.
Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'libcsfml-graphics.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibcsfml-graphics.dylib.dylib, 1): image not found
One thing I found curious is that "dlopen(liblibcsfml-graphics.dylib.dylib)" call. It seems to me that the DllImport is prepending lib and appending .dylib of its own accord, so I tried removing the "lib" and ".dylib" from the const string in SFML.NET and rebuilding. This results in "dlopen(csfml-graphics)" which I find strange -- the appending seems to be conditional on it already being of the correct form.
I'm not sure if this is normal, but it seems very strange to me. In any case, I tried putting copies of the dylib file with all sorts of names - "csfml-graphics", "libcsfml-graphics.dylib" and "liblibcsfml-graphics.dylib.dylib" for good measure. It doesn't seem to find any of these, even though it correctly finds the corresponding DLLs on Windows in the same directory (I have these libraries in the execution directory in project-path/bin/.../).
I've spent quite a lot of time digging and playing around, but I'm not really getting anywhere, so I was wondering if anyone else has invested some time into running new builds on SFML.NET on MacOS without Mono? If so, I'd appreciate some pointers on how to get it working at runtime!
If no-one has gotten it working, but someone has some time and fancies helping, I'm happy to provide more information and a sample project.
Thanks in advance for any help and pointers!