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

Author Topic: Binding for DotNet in Linux (Mono)?  (Read 10306 times)

0 Members and 3 Guests are viewing this topic.

ZDragon

  • Newbie
  • *
  • Posts: 2
    • View Profile
Binding for DotNet in Linux (Mono)?
« on: December 05, 2009, 11:58:34 am »
Hallo everybody,
I wasn't able to find anything on this yet, and the search didn't help me either, so I'm gonna ask it here: how do I go about developing with SFML in conjunction with Mono?

As far as I've seen, there is no download for a DotNet binding under Linux, so I don't really know how to go about doing it. As I'm completely new to SFML, it would be great if I could get a little help there. Anyone else that has tried out this admittedly exotic combination?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Binding for DotNet in Linux (Mono)?
« Reply #1 on: December 05, 2009, 12:07:52 pm »
MonoDevelop is able to import Visual Studio solutions. I tested it a fews days ago and it worked pretty well.

However this is not a final solution, I'll try to provide makefiles for Linux in the future.
Laurent Gomila - SFML developer

ZDragon

  • Newbie
  • *
  • Posts: 2
    • View Profile
Binding for DotNet in Linux (Mono)?
« Reply #2 on: December 06, 2009, 01:52:11 pm »
I know that I can import solutions, but I wanted to develop everything in Mono from scratch. Plus, I somehow need to have SFML installed on my Linux machine of course, and I suppose with the DotNet bindings.

So yea, it would be great if you could provide makefiles for that in the future. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Binding for DotNet in Linux (Mono)?
« Reply #3 on: December 06, 2009, 02:31:46 pm »
Quote
I know that I can import solutions, but I wanted to develop everything in Mono from scratch. Plus, I somehow need to have SFML installed on my Linux machine of course, and I suppose with the DotNet bindings.

You have to install SFML, CSFML, and then recompile SFML.Net (whether it is from a makefile or from MonoDevelop with the Visual Studio solution, it doesn't really matter).

Once you have SFML.Net compiled for Linux, you can play with it and do whatever you want.
Laurent Gomila - SFML developer

alket

  • Newbie
  • *
  • Posts: 1
    • View Profile
Binding for DotNet in Linux (Mono)?
« Reply #4 on: August 30, 2010, 03:57:51 am »
As I see, there is no official linux x64 for mono c#. Can you tell me where to download the source and compile it. Thank you.

Brendon

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • http://blendogames.com
Binding for DotNet in Linux (Mono)?
« Reply #5 on: September 02, 2010, 08:06:41 am »
SFML works well with Mono. I grabbed the dotnet bindings and recompiled them on my Linux box.

And if you include some specific mono libraries, you can make your program a stand-alone app. If you'd like an example, a game I recently made uses SFML/Mono: http://blendogames.com/airforte/

Mightygaver

  • Newbie
  • *
  • Posts: 4
    • View Profile
Binding for DotNet in Linux (Mono)?
« Reply #6 on: December 15, 2010, 01:52:21 pm »
Well, I've tried to get  a development environment with mono and dotnet bindings, but... I failed.

I tried to position the dlls inside the extlibs directory in the same directory where the mono executable was created (bin/Debug) and I tried to compile the c# source with monodevelop and link them with references, but nothing of this works...

I've installed a x64 version of linux. Is possible the dlls in the extlibs directory at dotnet binding are compiled for x86 architecture and the mono VM get in trouble with this?

If that was the reason then, have I to compile the c++ project for x64 for windows or for linux?. I don't know if mono uses windows dll for native code or linux libraries.

This was a real disaster for me, I don't know what is the problem...

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Binding for DotNet in Linux (Mono)?
« Reply #7 on: December 15, 2010, 01:54:59 pm »
What errors do you get?
Laurent Gomila - SFML developer

Mightygaver

  • Newbie
  • *
  • Posts: 4
    • View Profile
Binding for DotNet in Linux (Mono)?
« Reply #8 on: December 15, 2010, 07:37:36 pm »
In a Ubuntu 10.04 with mono 2.6 and in a Fedora 14 with mono 2.8 ( the two running at x64 arch)


Code: [Select]

Unhandled Exception: System.DllNotFoundException: csfml-graphics
  at (wrapper managed-to-native) SFML.Graphics.RenderWindow:sfRenderWindow_Create (SFML.Window.VideoMode, string, SFML.Window.Styles, SFML.Window.WindowSettings)
  at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title, Styles style, WindowSettings settings) [0x00000] in <filename unknown>:0
  at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
  at adsasd.MainClass.Main (System.String [] args) [0x00000] in <filename unknown>:0


I don't know why throws this exception, because the csfml-graphics.dll from extlibs directory is at the same directory as the executable.

I hope this error says you what happens.

Mightygaver

  • Newbie
  • *
  • Posts: 4
    • View Profile
Binding for DotNet in Linux (Mono)?
« Reply #9 on: December 25, 2010, 12:43:32 pm »
Sorry for the double post, but can anyone give me a hand?

I have to be wrong at any step.

Can anyone tell me the steps to install it?  Or simply give me an advice of what can be wrong at my setup.

Thanks and merry xmas! :D

Brendon

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • http://blendogames.com
Binding for DotNet in Linux (Mono)?
« Reply #10 on: January 22, 2011, 10:11:33 pm »
You can take a look at how I structured my project: http://www.blendogames.com/files/airfortedemo.tar.gz

I include a shell script that tells Mono where to find the libraries - maybe give that a try.

Mightygaver

  • Newbie
  • *
  • Posts: 4
    • View Profile
Binding for DotNet in Linux (Mono)?
« Reply #11 on: January 29, 2011, 10:42:39 pm »
Thanks!

I cannot do it work with environment variables.. but I see the dependencies where the C libraries... not the C++.

It was the real problem. I installed now the C libraries over the /usr/lib with aptitude, and works fine.

This sames a joke, but it's true.