-
Notifications
You must be signed in to change notification settings - Fork 319
OS X: System.DllNotFoundException: /Library/Frameworks/SDL.framework/SDL at at (wrapper managed-to-native) Tao.Sdl.Sdl:__SDL_InitSubSystem (int) #225
Description
Hello, I am attempting to run TrueCraft.Client on OS X, it builds from git (latest revision, 100b119) but fails to run with this error:
System.DllNotFoundException: /Library/Frameworks/SDL.framework/SDL
at at (wrapper managed-to-native) Tao.Sdl.Sdl:__SDL_InitSubSystem (int)
at Tao.Sdl.Sdl.SDL_InitSubSystem (Int32 flags) [0x0003b] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00044] 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 () [0x001fb] in <filename unknown>:0
at TrueCraft.Client.TrueCraftGame..ctor (TrueCraft.Client.MultiplayerClient client, System.Net.IPEndPoint endPoint) [0x00000] in /Users/admin/minecraft/TrueCraft/TrueCraft.Client/TrueCraftGame.cs:74
at TrueCraft.Client.Program.Main_Thread (System.String[] args) [0x00036] in /Users/admin/minecraft/TrueCraft/TrueCraft.Client/Program.cs:54
at TrueCraft.Client.Program.Main (System.String[] args) [0x00029] in /Users/admin/minecraft/TrueCraft/TrueCraft.Client/Program.cs:21
As stated on https://truecraft.io/download#osx "TrueCraft is not currently supported on OS X. If you are a developer and wish to change that, we'd love your pull request. It should be easy to port, we just need someone with access to OS X to do it.", so I gave it a shot, but this is where I got stuck. See also: #182 Add Mac OSX Support
Configuration:
- Mac OS X 10.11.2
- Xamarin Studio from http://download.xamarin.com/studio/Mac/XamarinStudio-5.10.0.871-0.dmg
- MonoFramework-MDK-4.2.1.102.macos10.xamarin.universal.pkg from http://www.monodevelop.com/download/
Launched Xamarin Studio, opened TrueCraft.sln, Run > Start Debugging - this successfully launches the TrueCraft server ("TrueCraft" project) and I can connect with the official Minecraft 1.7.3 beta client.
However if I run the client by setting Project > Solution Options > Run > Startup Project > TrueCraft.Client, then choosing Run, it fails with the above System.DllNotFoundException: /Library/Frameworks/SDL.framework/SDL error. Sure enough, on my system /Library/Frameworks/SDL.framework does not exist.
As described in the readme, I restored the NuGet packages (in Xamarin Studio: Project > Update NuGet Packages, Restore NuGet Packages), and it succeeds with no error. I believe I followed the instructions correctly, but am new to Mono so I apologize in advance if I'm missing something obvious.
Maybe a step in the build instructions is missing? There are several other references to other libraries in /Library/Frameworks on OS X (SDL, SDL_image, SDL_mixer, SDL_ttf, SDL_net, SDL_gfx, and smpeg). Looks like SDL.framework can be downloaded from http://libsdl.org/download-1.2.php (not http://libsdl.org/download-2.0.php which provides SDL2.framework) and copied to /Library/Frameworks, which fixes this particular error but then SDL_mixer etc. is missing. Is it possible to have these frameworks bundled within TrueCraft?