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

Author Topic: Getting SFML to work on Mono  (Read 3622 times)

0 Members and 1 Guest are viewing this topic.

TheDuceCat

  • Newbie
  • *
  • Posts: 12
    • View Profile
Getting SFML to work on Mono
« on: February 14, 2012, 04:45:13 am »
I'm testing out SFML on Mono on my MacBook Pro, but it can't find the csfml-window file, no matter what I do. I tried using a dll.config, using the linux files, the os x files, the windows dll's, nothing works! I can't get this working!

Edit:

Code: [Select]

Unhandled Exception: System.DllNotFoundException: csfml-window
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.WindowSettings)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, WindowSettings settings) [0x00000] in <filename unknown>:0
  at SFML.Window.Window..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
  at SFMLTest.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: csfml-window
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.WindowSettings)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, WindowSettings settings) [0x00000] in <filename unknown>:0
  at SFML.Window.Window..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
  at SFMLTest.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Getting SFML to work on Mono
« Reply #1 on: February 14, 2012, 08:01:52 am »
There are similar threads on this forum (DotNet, not General :evil:), most of them are for Linux but the fix should be similar.
Laurent Gomila - SFML developer

TheDuceCat

  • Newbie
  • *
  • Posts: 12
    • View Profile
Getting SFML to work on Mono
« Reply #2 on: February 14, 2012, 03:43:12 pm »
Quote from: "Laurent"
There are similar threads on this forum (DotNet, not General :evil:), most of them are for Linux but the fix should be similar.


What csfml files do I need? I tried everything in the other posts.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Getting SFML to work on Mono
« Reply #3 on: February 14, 2012, 03:44:37 pm »
Quote
What csfml files do I need?

The release version of csfml-window, csfml-graphics and csfml-audio.
Laurent Gomila - SFML developer

TheDuceCat

  • Newbie
  • *
  • Posts: 12
    • View Profile
Getting SFML to work on Mono
« Reply #4 on: February 14, 2012, 07:13:23 pm »
Quote from: "Laurent"
Quote
What csfml files do I need?

The release version of csfml-window, csfml-graphics and csfml-audio.


I tried the .net CSFML files, the Linux ones, and the Mac ones, but none of them work. Why can't the .exe find it?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Getting SFML to work on Mono
« Reply #5 on: February 14, 2012, 08:19:03 pm »
.exe? On Mac? :|

I can't help you with OS X anyway, sorry, you'll have to wait for someone else.
Laurent Gomila - SFML developer

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Getting SFML to work on Mono
« Reply #6 on: February 25, 2012, 11:57:10 am »
Sorry to bump this but im having the same issues with the window example.

I have tried changing the config file but still get this:

Code: [Select]
richy@Richy-Len:~/sfmlnet/examples/window$ dir
sfmlnet-audio-2.dll.config     sfmlnet-window-2.dll.config  window.csproj
sfmlnet-graphics-2.dll.config  sfmlnet-window-2.dll.mdb     window.exe
sfmlnet-window-2.dll       Window.cs    window.exe.mdb
richy@Richy-Len:~/sfmlnet/examples/window$ mono window.exe

Unhandled Exception: System.DllNotFoundException: libcsfml-window.so.2
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libcsfml-window.so.2
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
richy@Richy-Len:~/sfmlnet/examples/window$ mono window.exe

Unhandled Exception: System.DllNotFoundException: libcsfml-window.so.2.0
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.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_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
richy@Richy-Len:~/sfmlnet/examples/window$ mono window.exe

Unhandled Exception: System.DllNotFoundException: libcsfml-window.so
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libcsfml-window.so
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
richy@Richy-Len:~/sfmlnet/examples/window$ mono window.exe

Unhandled Exception: System.DllNotFoundException: libcsfml-window.so
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libcsfml-window.so
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
richy@Richy-Len:~/sfmlnet/examples/window$ mono window.exe

Unhandled Exception: System.DllNotFoundException: libcsfml-window.so.2.0
  at (wrapper managed-to-native) SFML.Window.Window:sfWindow_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.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_Create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Window.Window..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at window.Program.Main () [0x00000] in <filename unknown>:0
richy@Richy-Len:~/sfmlnet/examples/window$


I built both SFML and cSFML and these are installed in /usr/local
with my config files looking like:

Code: [Select]
<configuration>
  <dllmap dll="csfml-window-2" target="libcsfml-window.so.2.0" />
</configuration>


and my usr/local/lib has:
Code: [Select]
richy@Richy-Len:/usr/local/lib$ dir
libcsfml-audio-d.so    libcsfml-window-d.so       libsfml-network-d.so.2.0
libcsfml-audio-d.so.2    libcsfml-window-d.so.2     libsfml-network-s.a
libcsfml-audio-d.so.2.0     libcsfml-window-d.so.2.0   libsfml-network-s-d.a
libcsfml-audio.so    libcsfml-window.so       libsfml-network.so
libcsfml-audio.so.2    libcsfml-window.so.2       libsfml-network.so.2
libcsfml-audio.so.2.0    libcsfml-window.so.2.0     libsfml-network.so.2.0
libcsfml-graphics-d.so    libsfml-audio-d.so       libsfml-system-d.so
libcsfml-graphics-d.so.2    libsfml-audio-d.so.2       libsfml-system-d.so.2
libcsfml-graphics-d.so.2.0  libsfml-audio-d.so.2.0     libsfml-system-d.so.2.0
libcsfml-graphics.so    libsfml-audio-s.a       libsfml-system-s.a
libcsfml-graphics.so.2    libsfml-audio-s-d.a        libsfml-system-s-d.a
libcsfml-graphics.so.2.0    libsfml-audio.so       libsfml-system.so
libcsfml-network-d.so    libsfml-audio.so.2       libsfml-system.so.2
libcsfml-network-d.so.2     libsfml-audio.so.2.0       libsfml-system.so.2.0
libcsfml-network-d.so.2.0   libsfml-graphics-d.so      libsfml-window-d.so
libcsfml-network.so    libsfml-graphics-d.so.2    libsfml-window-d.so.2
libcsfml-network.so.2    libsfml-graphics-d.so.2.0  libsfml-window-d.so.2.0
libcsfml-network.so.2.0     libsfml-graphics-s.a       libsfml-window-s.a
libcsfml-system-d.so    libsfml-graphics-s-d.a     libsfml-window-s-d.a
libcsfml-system-d.so.2    libsfml-graphics.so        libsfml-window.so
libcsfml-system-d.so.2.0    libsfml-graphics.so.2      libsfml-window.so.2
libcsfml-system.so    libsfml-graphics.so.2.0    libsfml-window.so.2.0
libcsfml-system.so.2    libsfml-network-d.so       pkgconfig
libcsfml-system.so.2.0    libsfml-network-d.so.2     python2.7
richy@Richy-Len:/usr/local/lib$

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Getting SFML to work on Mono
« Reply #7 on: February 25, 2012, 02:19:40 pm »
Is usr/local/lib in the library loader's search paths? It's controlled by the LD_LIBRARY_PATH environment variable under Linux, no idea if it's the same on OS X.
Laurent Gomila - SFML developer

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Getting SFML to work on Mono
« Reply #8 on: February 25, 2012, 02:45:48 pm »
Quote from: "Laurent"
Is usr/local/lib in the library loader's search paths? It's controlled by the LD_LIBRARY_PATH environment variable under Linux, no idea if it's the same on OS X.


Yea this was my bad, I had the .config files inside a folder in my project, so when they were build they werent in the same folder as the exe