The MonoGame application says that SDL.dll is missing, although it is. What for?

I have a MonoGame application created using the Linux Game template in Visual Studio. It works on Windows using .NET or Mono, but it does not work on Linux.

Error DllNotFoundExceptionregarding SDL.dll, but SDL.dll is always in the binary directory. The file is not a CLR environment, so it is not listed in the links. Instead, I copied it during assembly from the MonoGame Assemblies / Linux directory (and all related CLR assemblies are also copied from this folder). The error appears regardless of whether I created the project under Windows in Visual Studio or Xamarin Studio or under Linux in MonoDevelop. Build errors do not exist.

Here's the corresponding stack trace:

System.DllNotFoundException: SDL.dll
  at (wrapper managed-to-native) Tao.Sdl.Sdl:__SDL_InitSubSystem (int)
  at Tao.Sdl.Sdl.SDL_InitSubSystem (Int32 flags) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0 

(I did not include the code because it is not related to my code - this happens even if I create a new project from the template. I have been working on this issue for many hours and tried all the combinations that were offered in different forums, but I still did not find a solution.)

What can I do to fix this?


Addition . When MONO_LOG_LEVEL=debugI see attempts to perform a search in the DLL, and everyone says that the file was not found. When I try to “help” the runtime by renaming the file to libSDL.dll(or something else that it is looking for), it says “invalid ELF header” and ignores it. Most likely, this should be expected, since it looks like a Win32 binary (and not a CLR assembly).

+4
source share
2

:

, SDL.dll( Assemblies/Linux) Win32. , "MonoGame for Linux", , Windows. Linux DLL . Mono SDL Linux. - , , .

:

  • , Linux ​​ libSDL.
  • Tao.Sdl.dll.config. , Tao.Sdl.dll ( SDL Tao.Sdl.dll).
  • , .
  • ( libSDL 1.2 - ):

    <?xml version="1.0" encoding="utf-8"?> <configuration> <dllmap dll="SDL.dll" target="libSDL-1.2.so.0" /> <dllmap dll="SDL_image.dll" target="libSDL_image-1.2.so.0" /> <dllmap dll="SDL_mixer.dll" target="libSDL_mixer-1.2.so.0" /> <dllmap dll="SDL_ttf.dll" target="libSDL_ttf-2.0.so.0" /> <dllmap dll="SDL_net.dll" target="libSDL_net-1.2.so.0" /> <dllmap dll="smpeg.dll" target="libsmpeg-0.4.so.0" /> <dllmap dll="SDL_gfx.dll" target="libSDL_gfx.so.4" /> </configuration>

  • .

Mono libSDL .

+4

, , , , , .

  • Linux Nuget (https://www.nuget.org/profiles/MonoGame). .
  • (, ). Nugets , , Linux, , , readme Nuget
  • Linux SDL , . , (debian) libsdl1.2debian ( "libSDL-1.2.so.0" ), , "libSDL_mixer-1.2.so.0" , , aptcache libsdl-mixer1.2. .
+1

All Articles