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

Author Topic: How to compile a project with SFML.NET under Ubuntu?  (Read 9425 times)

0 Members and 1 Guest are viewing this topic.

AleVerDes

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
How to compile a project with SFML.NET under Ubuntu?
« on: August 24, 2013, 02:28:35 pm »
Hello everyone.

I have a few questions about moving my games from Windows on Linux. Can you tell me how to do it?

Do I need a Linux distribution to compile the project under it? For example, the same Unity3D successfully compiles the Linux-projects of under Windows.

I've heard that you will need some way to change the DLL in SO. How can this be done?

Simply, I never contacted Unix-platform and it is for me very difficult. Can you tell us about that?

And then how to distribute my game? To require the player to download a deb-package with my game and the necessary files, such as Mono Runtime or something.
« Last Edit: August 24, 2013, 05:22:35 pm by AleVerDes »

First

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #1 on: August 24, 2013, 07:13:57 pm »
Unity компилирует все свои проекты под много разных платформ, ведь это его сила. Тебе нужен для этого Mono. Используй его, ибо SFML работает с ним.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #2 on: August 24, 2013, 07:22:09 pm »
I've gone through part of that myself so here's the stuff I do know.

If you want to make a version of your program for a certain platform, you do need to get that platform to compile it on.  I didn't see any cross-compilation tools when I looked for them so I have no idea how Unity does it (I can only assume it's tricking a compiler into thinking it's on Linux).  However, Linux is completely free and so are some VM programs that can virtualize it (personally I've been using VMware Player and the latest stable Ubuntu release) so it's not hard to get that setup.

You don't convert dll's to so's.  Changing the file extension is easy, but they represent dynamically linked libraries for Windows versus Linux, which is not the sort of thing you can just convert.  A Linux version of a library has to be compiled on Linux, just like any other program.  But if you download SFML for Linux it'll come with all the libraries you need, just like the Windows version did.

I haven't learned about Linux packages yet myself but for very simple distribution you can just put everything in a .tar.gz file (tar archive, gunzip compression; 7zip can do this stuff) and have people download and extract that on their machines.

AleVerDes

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #3 on: August 24, 2013, 09:05:29 pm »
I'm using MonoDevelop on my VM with Ubuntu. So, I do not understand about the DLL. The documentation says something about SFML.NET DllMap - but how to use it, where to paste and so on?

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #4 on: August 24, 2013, 10:50:09 pm »
That part I can't help with since I haven't done anything with .NET, much less on Linux (to be honest I had no idea you could even use .NET on Linux).  Hopefully someone who knows that stuff will see this topic soon.

AleVerDes

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #5 on: August 25, 2013, 11:06:36 pm »
I tried to compile the game under Ubuntu:

1. It's my game folder: link (jpg)



2. It's my dll-config: link (jpg)



3. It's my terminal-error: link (jpg)



What am I doing wrong and what is my mistake?
« Last Edit: August 26, 2013, 12:19:13 pm by AleVerDes »

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #6 on: August 25, 2013, 11:12:28 pm »
Well, again I have no experience with this particular setup but the one thing that comes to mind is maybe the working directory isn't where you think it is (a lot of IDEs make this more confusing than it should be).  Try putting the library in a bunch of other places and see if it finds it then.

AleVerDes

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #7 on: August 25, 2013, 11:20:35 pm »
I tried to move the project to / home / aleverdes, but it did not help.

In this topic say that you want to move the library to the local, but I can not do that - the button "Insert" ("Put") is simply not active. They also say install libGLEW1.7, but in the repositories is only libGLEW1.8. Maybe these two points the problem?
« Last Edit: August 26, 2013, 11:54:26 am by AleVerDes »

AleVerDes

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #8 on: August 26, 2013, 01:00:09 pm »
Installing libGLEW1.7 did not help, unfortunately.

Zylander

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #9 on: September 05, 2014, 03:10:41 pm »
Is there really no way to do this? I've been searching for hours now. Trying to compile under Ubuntu I just get errors.
« Last Edit: November 25, 2023, 04:21:16 pm by Zylander »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #10 on: September 05, 2014, 03:50:09 pm »
Its very much possible, you need to first install SFML and CSFML. Then use the dllconfig files to remap csfml-xxx.dll to the platform specific versions (do it for each SFML.NET dll). After that you should be good to go.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

almavar

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How to compile a project with SFML.NET under Ubuntu?
« Reply #11 on: June 19, 2016, 08:10:58 am »
Its very much possible, you need to first install SFML and CSFML. Then use the dllconfig files to remap csfml-xxx.dll to the platform specific versions (do it for each SFML.NET dll).
 After that you should be good to go.

Thank you for your input zsbzsb, glad you clarified the procedure as you saved me a ton of time. It works. Thanks
« Last Edit: August 17, 2016, 05:53:00 am by almavar »

 

anything