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

Author Topic: SFML.NET/Linux DllNotFoundException  (Read 4400 times)

0 Members and 1 Guest are viewing this topic.

Illuyankas

  • Newbie
  • *
  • Posts: 1
    • View Profile
SFML.NET/Linux DllNotFoundException
« on: June 13, 2013, 12:28:10 pm »
I am having trouble getting SFML.NET to work under Linux, I tried fiddling around with various solutions suggested on the forums but nothing seems to work.

Quote
    >./shader.exe
    Unhandled Exception: System.DllNotFoundException: libcsfml-window.so.2.0
      at (wrapper managed-to-native) SFML.Window.Window:sfWindow_createFromHandle (intptr,SFML.Window.ContextSettings&)
      at SFML.Window.Window..ctor (IntPtr Handle, ContextSettings settings) [0x00000] in <filename unknown>:0
      at SFML.Window.Window..ctor (IntPtr handle) [0x00000] in <filename unknown>:0
      at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
      at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
      at shader.Program.Main () [0x00000] in <filename unknown>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libcsfml-window.so.2.0
      at (wrapper managed-to-native) SFML.Window.Window:sfWindow_createFromHandle (intptr,SFML.Window.ContextSettings&)
      at SFML.Window.Window..ctor (IntPtr Handle, ContextSettings settings) [0x00000] in <filename unknown>:0
      at SFML.Window.Window..ctor (IntPtr handle) [0x00000] in <filename unknown>:0
      at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
      at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
      at shader.Program.Main () [0x00000] in <filename unknown>:0

Quote
> ldconfig  -v | grep "libcsfml"
        libcsfml-graphics.so.2 -> libcsfml-graphics.so.2.0
        libcsfml-network.so.2 -> libcsfml-network.so.2.0
        libcsfml-window.so.2 -> libcsfml-window.so.2.0
        libcsfml-audio.so.2 -> libcsfml-audio.so.2.0

I also tried installing GLEW1.7 as was suggested in a rather old topic here as well installing the newest version (1.9) from their site, that didn't resolve the issue either.

The dll.config(s) do seem to be set up right since the error message shows the library it is supposed to look for, so I am starting to run out of ideas.
« Last Edit: June 13, 2013, 01:11:47 pm by Illuyankas »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML.NET/Linux DllNotFoundException
« Reply #1 on: June 13, 2013, 03:13:39 pm »
I don't do .net/mono development on linux, so I am guessing here. But have you made sure that your OS can find the libcsfml-xxx.so.2.0 libraries? From the few minutes I took searching it seems as if linux does not look next to the executable for libraries, but rather it looks at a path that is defined in some system variables.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: SFML.NET/Linux DllNotFoundException
« Reply #2 on: June 13, 2013, 04:50:24 pm »
Did you download SFML.Net from the download page or did you download the latest source from Github?

I had a similar problem too with the one from the download page (probably issue #18), which was solved when I downloaded the version from github and compiled it myself (by just opening the provided sln for vc2008 in MonoDevelop).

(I'm not sure if I had the exact same error as you, but it was also about the RenderWindow constructor.)
« Last Edit: June 13, 2013, 04:52:42 pm by texus »
TGUI: C++ SFML GUI

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML.NET/Linux DllNotFoundException
« Reply #3 on: June 13, 2013, 06:13:09 pm »
If you read the error message you will clearly see this is an entirely different issue.  ;)

To quote from his error message
Quote
Unhandled Exception: System.DllNotFoundException: libcsfml-window.so.2.0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libcsfml-window.so.2.0
« Last Edit: June 13, 2013, 06:19:22 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: SFML.NET/Linux DllNotFoundException
« Reply #4 on: June 14, 2013, 11:22:47 am »
Yeah, you're right. I've only been using it for three days so I don't really know those errors yet.
But I though I'd mention it anyway since it was the only real problem I faced to get it working.

I've been able to reproduce your error though.
I get it when I remove the c++ libs of sfml. Did you install those correctly?
TGUI: C++ SFML GUI

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: SFML.NET/Linux DllNotFoundException
« Reply #5 on: June 14, 2013, 12:15:29 pm »
I missed one small detail.
In my error it said "/usr/local/lib/libcsfml-window.so.2.0" because that is what I have in the config file.

If I change my config file to just "libcsfml-window.so.2.0" then I get the exact same error as you, but even if the c++ libraries are installed correctly.

So you might also want to try putting the full path in there.
Quote
<dllmap dll="csfml-window-2" target="/usr/local/lib/libcsfml-window.so.2.0"/>
<dllmap dll="csfml-graphics-2" target="/usr/local/lib/libcsfml-graphics.so.2.0"/>
TGUI: C++ SFML GUI

 

anything