3
\$\begingroup\$

I am trying to run SFML.NET on arch linux and I have two dll.config files in my project called sfmlnet-graphics-2.dll.config and sfmlnet-window-2.dll.config.

sfmlnet-graphics-2.dll.config:

    <configuration>
       <dllmap os="linux" dll="csfml-graphics-2" target="libcsfml-graphics.so" />
       <dllmap os="linux" dll="csfml-window-2" target="libcsfml-window.so" />
    </configuration>

And sfmlnet-window-2.dll.config:

    <configuration>
       <dllmap os="linux" dll="csfml-window-2" target="libcsfml-window.so"/>
    </configuration>

So the dll map should work, though I still get this error when I try to run.

    Unhandled Exception: System.DllNotFoundException: Unable to load DLL 
    'csfml-graphics-2': The specified module or one of its dependencies 
    could not be found.
     (Exception from HRESULT: 0x8007007E)
       at SFML.Graphics.RenderWindow.sfRenderWindow_createUnicode(VideoMode 
    Mode, IntPtr Title, Styles Style, ContextSettings& Params)
       at SFML.Graphics.RenderWindow..ctor(VideoMode mode, String title, 
    Styles style, ContextSettings settings)
      at SFML.Graphics.RenderWindow..ctor(VideoMode mode, String title)
      at HelloSharp.Program.Main(String[] args) in 
   /home/kas/Documents/CodeProjects/HelloSharp/Program.cs:line 13

This is my Program.cs file:

    using System;
    using SFML.Graphics;
    using SFML.Window;

    namespace HelloSharp
    {
        class Program
{

    private static RenderWindow window;
    static void Main(string[] args)
    {
        window = new RenderWindow(new VideoMode(1280, 720), "Game");
        window.Closed += new EventHandler(OnClosed);
        window.KeyPressed += new EventHandler<KeyEventArgs>(OnKeyPressed);

        while(window.IsOpen) {
            window.DispatchEvents();
            window.Clear();
            window.Display();
        }
    }

    private static void OnKeyPressed(object sender, KeyEventArgs e)
    {
        RenderWindow window = (RenderWindow) sender;
        if(e.Code == Keyboard.Key.Escape)
            window.Close();
    }

    private static void OnClosed(object sender, EventArgs e)
    {
        RenderWindow window = (RenderWindow) sender;
        window.Close();
    }
}
    }

Here is a picture of my projects layout (where all the files are in relation to each other).

I have the linux version of the csfml .dll's next to the project dll, as well as the linux .so files and the sfmlnet .dll's. I went through a bunch of google searches, tried a bunch of fixes and nothing seems to work. If you take the time to try and help me I appreciate it. ~Kas

\$\endgroup\$

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.