rochus-keller / Oberon

Oberon parser, code model & browser, compiler and IDE with debugger, and an implementation of the Oberon+ programming language
GNU General Public License v2.0
464 stars 30 forks source link

System.DllNotFoundException: SDL2.dll on macOS M2 MacBook Air #39

Closed berkeleynerd closed 1 year ago

berkeleynerd commented 1 year ago

When attempting to run the OberonSystem example the following exception is encountered :



System.DllNotFoundException: SDL2.dll
  at (wrapper managed-to-native) SDL.GetVersion(SDL/version*)
  at ObSdl.createRasterBuffer (System.Int32 length) [0x00008] in <c4d834eb88f245ae83ac2daea9ff7bff>:0 
  at ObsX.createRasterBuffer (System.Int32 length) [0x00000] in <c77eb3d44146414842b1c191f03b69c1>:0 
  at Display.beg?n () [0x000cc] in <ad61697745564c8249b810549aec1afa>:0 
  at Oberon.beg?n () [0x00022] in <3977234fb0c845dc6d9b741e07708547>:0 
  at OBX.Runtime.pcall (OBX.Command cmd, System.Boolean report) [0x00000] in <ff1ddc7e08a04893984d4f2c743f28e1>:0 
System.DllNotFoundException: SDL2.dll
  at (wrapper managed-to-native) SDL.WaitEventTimeout(SDL/Event*,int)
  at ObSdl.processEvents (System.Int32 sleep) [0x0002a] in <c4d834eb88f245ae83ac2daea9ff7bff>:0 
  at ObSdl.getState (ObSdl+InputState state) [0x00000] in <c4d834eb88f245ae83ac2daea9ff7bff>:0 
  at ObsX.getState (ObSdl+InputState state) [0x00000] in <c77eb3d44146414842b1c191f03b69c1>:0 
  at Input.Mouse (System.Int32& keys, System.Int32& x, System.Int32& y) [0x00006] in <62568a5358564a0ea09ab3bb42bed36f>:0 
  at Oberon.Loop () [0x00020] in <3977234fb0c845dc6d9b741e07708547>:0 
  at OBX.Runtime.pcall (OBX.Command cmd, System.Boolean report) [0x00000] in <ff1ddc7e08a04893984d4f2c743f28e1>:0 

The application finished with code 0```
rochus-keller commented 1 year ago

You can copy the libSDL2.dylib included with the DMG to the build directory. As far as I remember it's in the mono directory in the root.

berkeleynerd commented 1 year ago

Solution worked as described.