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

Author Topic: How to compile SFML.Net under Linux  (Read 3714 times)

0 Members and 1 Guest are viewing this topic.

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
How to compile SFML.Net under Linux
« on: July 17, 2015, 04:25:38 pm »
I have troubles compiling latest SFML.Net sources under Linux. I have SFML 2.3.1 and CSFML 2.3.1 compilled and installed in my system. They are up and running.

I have newest Mono (4.0.2) and MonoDevelop (5.9.4) installed from official Xamarin repository for Ubuntu.

I opened the .sln file from SFML.Net sources, hit build and instantly got the following error:

Code: [Select]
Error: /home/user/Downloads/SFML.Net-master/src/System/sfml-system.csproj: /home/user/Downloads/SFML.Net-master/src/System/sfml-system.csproj
could not import "$(MSBuildBinPath)\Microsoft.CSharp.targets" (sfml-system)

Any ideas?

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: How to compile SFML.Net under Linux
« Reply #1 on: July 19, 2015, 09:49:28 pm »
I have implemented a change here. Can you verify that this fixes the issue?

https://github.com/SFML/SFML.Net/pull/120
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: How to compile SFML.Net under Linux
« Reply #2 on: July 20, 2015, 10:01:13 pm »
Yes, now it compiles under Mono.

However after this pull MonoDevelop complains that the project file is made in Visual 2008 which doesn't support .NET 4.0, but MonoDevelop is able to convert project file to VS 2012 format (anyway, I think it would be a good idea to generally update the project file as Visual 2008 is super obsolete now).

And there are some warnings:
Code: [Select]
Warning CS0618: `SFML.Window.EventType.MouseWheelMoved' is obsolete: `MouseWheelMoved is deprecated, please use MouseWheelScrolled instead' (CS0618) (sfml-window)

Warning CS0618:  `SFML.Window.MouseWheelEventArgs' is obsolete: `MouseWheelEventArgs is deprecated, please use MouseWheelScrollEventArgs instead' (CS0618) (sfml-window)

Warning CS0618: `SFML.Window.Event.MouseWheel' is obsolete: `MouseWheel is deprecated, please use MouseWheelScroll instead' (CS0618) (sfml-window)

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: How to compile SFML.Net under Linux
« Reply #3 on: July 20, 2015, 11:52:10 pm »
Yes, now it compiles under Mono.

Great  :D

Quote
anyway, I think it would be a good idea to generally update the project file as Visual 2008 is super obsolete now

Go ahead and convince Laurent ;)

Quote
And there are some warnings:
Code: [Select]
Warning CS0618: `SFML.Window.EventType.MouseWheelMoved' is obsolete: `MouseWheelMoved is deprecated, please use MouseWheelScrolled instead' (CS0618) (sfml-window)

Warning CS0618:  `SFML.Window.MouseWheelEventArgs' is obsolete: `MouseWheelEventArgs is deprecated, please use MouseWheelScrollEventArgs instead' (CS0618) (sfml-window)

Warning CS0618: `SFML.Window.Event.MouseWheel' is obsolete: `MouseWheel is deprecated, please use MouseWheelScroll instead' (CS0618) (sfml-window)

That is fine, its because we need to access our own deprecated types to provide the implementation so when we touch them the deprecated flag throws the warning.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to compile SFML.Net under Linux
« Reply #4 on: July 21, 2015, 07:38:01 am »
Quote
Go ahead and convince Laurent
Go ahead and submit a PR :P
Laurent Gomila - SFML developer

 

anything