Skip to content

System.DllNotFoundException

Problem

When attempting to run a program that uses SplashKit on MacOS, you may encounter the following error message: System.DllNotFoundException unable to load DLL splashkit.dll.

Solutions

Firstly, update your macOS to the latest version available. Ideally, your OS should be version 12.0 or later, as compatibility issues with splashkit.dll are less likely with more recent versions of macOS.

Solution 1: Build the SplashKit library locally

Run the following command to build the library for your OS, which will overwrite the provided library file from when you installed SplashKit:

Terminal window
skm macos install

Then, if needed, re-install the library globally with the following command:

Terminal window
skm global install

Solution 2: Use an older version of SplashKit

If you are using a version of macOS older than 12.0, you can revert SplashKit to a previous version that may be more compatible with your system. Run the following commands in Terminal, one line at a time:

Terminal window
cd ~/.splashkit
Terminal window
git fetch --unshallow
Terminal window
git checkout cbb68dc

Using SplashKit with Solution 2

Note: After these commands, using skm dotnet new might affect the structure of SplashKit project files. Instead, you can use this Template SplashKit Project (zipped folder) for creating new projects.

  1. Unzip the downloaded template.
  2. Read the “README.txt” file for guidance on setting up new projects.
  3. Review the Program.cs file, which includes a comment to help configure the project. Once set up, you can remove the comment lines.

These steps should help resolve compatibility issues with splashkit.dll and ensure that your programs run smoothly.