Closed spektro37 closed 4 years ago
What is the version of glfw you are using? Glfw version must be 3.3.2 or later.
What do you get if you call Console.WriteLine(SpaceVIL.Common.CommonService.GetSpaceVILInfo())
before InitSpaceVILComponents()
?
I believe the newest version of GLFW available from Ubuntu repositories is 3.2.1-1. This is the version being installed when I execute the sudo apt-get install libglfw3
command as per the guide on the official web site. Is there a version of SpaceVIL that can work with this version of GLFW?
Using Console.WriteLine(SpaceVIL.Common.CommonService.GetSpaceVILInfo())
has provided the following output:
SpaceVIL version: 0.3.5.0-ALPHA - January 2020
Platform: .Net Core
OS type: Linux
The best solution in this case is to extract libglfw.so from LWJGL.
Another solution is compile GLFW by yourself...
PS. you could also try SpaceVIL 0.3.4.3-ALPHA 10.03.2019 at https://spvessel.com/previous_versions.html
By the way, download Nightly build of LWJGL (Release build do not contains libglfw.so version 3.3.2 )
I have compiled the GLFW myself and removed the GLFW packages I have installed previously from the Ubuntu repository. After that I have placed the libglfw.so file into the same folder where MyApp is being built to (.../Debug). However, I am getting a new error message now:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
at System.Runtime.InteropServices.FunctionWrapper`1.get_Delegate()
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)
at System.Drawing.Image.InitializeFromStream(Stream stream)
at System.Drawing.Bitmap..ctor(Stream stream, Boolean useIcm)
at System.Drawing.Bitmap..ctor(Stream stream)
at SpaceVIL.Common.DefaultsService.a()
at SpaceVIL.Common.CommonService.InitSpaceVILComponents()
at MyApp.Program.Main(String[] args) in /home/username/MyApp/Program.cs:line 10
Do I need to do anything additional (e.g. register the libglfw.so anywhere or add it to the .csproj file)?
You need to install libgdiplus.so Try this https://github.com/stulzq/dotnetcore-image Or https://zoomadmin.com/HowToInstall/UbuntuPackage/libgdiplus
PS. I completely forgot to mention this in guide for Linux users. Sorry, my bad.
Thanks, now the demo is working!
I think it might be worthwhile mentioning in the guide that Ubuntu doesn't have the required version of GLFW (3.3.2) at the moment and that GLFW needs to be built and placed next to the SpaceVIL.dll (if I got it right) as a separate step.
When following the steps to create a project using SpaceVIL on Ubuntu 18.04 using Dot Net Core 3.1 following the steps from the official website (https://spvessel.com/#downloads) an unhandled exception is thrown:
Code
Program.cs
MainWindow.cs
MyApp.csproj