2017-04-18 35 views
1

我'嘗試使用monogame與騎士,併爲項目的基本模板:Monogame SDL2對騎手和Ubuntu的錯誤

https://github.com/bussiere/MonoGameRiderTemplate

到目前爲止好,現在我有一個錯誤SDL2:

Unhandled Exception: 
System.DllNotFoundException: SDL2.dll 
at (wrapper managed-to-native) Sdl:GetVersion (Sdl/Version&) 
at Microsoft.Xna.Framework.SdlGamePlatform..ctor (Microsoft.Xna.Framework.Game game) <0x412db940 + 0x000f7> in :0 
at Microsoft.Xna.Framework.GamePlatform.PlatformCreate (Microsoft.Xna.Framework.Game game) <0x412db290 + 0x00027> in :0 
at Microsoft.Xna.Framework.Game..ctor() <0x412d8250 + 0x008d3> in :0 
at Example.Game1..ctor() <0x412d7f50 + 0x0000f> in :0 
at Example.Program.Main() <0x412d7d50 + 0x00027> in :0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: SDL2.dll 
at (wrapper managed-to-native) Sdl:GetVersion (Sdl/Version&) 
at Microsoft.Xna.Framework.SdlGamePlatform..ctor (Microsoft.Xna.Framework.Game game) <0x412db940 + 0x000f7> in :0 
at Microsoft.Xna.Framework.GamePlatform.PlatformCreate (Microsoft.Xna.Framework.Game game) <0x412db290 + 0x00027> in :0 
at Microsoft.Xna.Framework.Game..ctor() <0x412d8250 + 0x008d3> in :0 
at Example.Game1..ctor() <0x412d7f50 + 0x0000f> in :0 
at Example.Program.Main() <0x412d7d50 + 0x00027> in :0 

我認爲我從SDL2來到LIB失蹤,我已經把它們放在 https://github.com/bussiere/MonoGameRiderTemplate/tree/master/Example/lib

Example/lib/ 

,我認爲該解決方案可在MonoGame.Framework.dll.config文件:

https://github.com/bussiere/MonoGameRiderTemplate/blob/master/Example/MonoGame.Framework.dll.config

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <dllmap dll="SDL2.dll" os="osx" target="./lib/darwin-x86_64/libSDL2-2.0.0.dylib"/> 
    <dllmap dll="soft_oal.dll" os="osx" target="./lib/darwin-x86_64/libopenal.1.dylib" /> 
    <dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./lib/linux-i686/libSDL2-2.0.so.0"/> 
    <dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./lib/linux-i686/libopenal.so.1" /> 
    <dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./lib/linux-x86_64/libSDL2-2.0.so.0"/> 
    <dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./lib/linux-x86_64/libopenal.so.1" /> 
</configuration> 

因此,如果任何人有任何想法...

感謝和問候

回答

1

我面臨同樣的問題。 事實證明SDL2沒有安裝。

的2個必需的包是:

  • libsdl2-2.0-0
  • libsdl2-dev的(不知道這是必須的)
1

的解決方案是更新SDL到2.0.5或最新版本