SFML community forums

Bindings - other languages => DotNet => Topic started by: netrick on July 17, 2015, 04:25:38 pm

Title: How to compile SFML.Net under Linux
Post by: netrick 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?
Title: Re: How to compile SFML.Net under Linux
Post by: zsbzsb on July 19, 2015, 09:49:28 pm
I have implemented a change here (https://github.com/SFML/SFML.Net/pull/120). Can you verify that this fixes the issue?

https://github.com/SFML/SFML.Net/pull/120
Title: Re: How to compile SFML.Net under Linux
Post by: netrick 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)
Title: Re: How to compile SFML.Net under Linux
Post by: zsbzsb 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.
Title: Re: How to compile SFML.Net under Linux
Post by: Laurent on July 21, 2015, 07:38:01 am
Quote
Go ahead and convince Laurent
Go ahead and submit a PR :P