问题
The graphics library Veldrid throws:
Could not find or load the native library from any name: [ SDL2.dll ]
when I try to run the example from the tutorial in a new C# Console Application, .NET v4.7.1.
When I try to reference the SDL2 dll, Visual Studio simply shows "A reference to 'C:\...\SDL2.dll' could not be added"
Do I need any additional wrappers? Veldrid.StartupUtilities is already supposed to be a simple wrapper for SDL2.
Do I need to use a different .NET version?
回答1:
I right-clicked my project, selected Add >
Existing Item
, selected the SDL2.dll supplied with the Veldrid download, clicked Add >
As Link
, set its Property
OnBuild
to Copy if newer and everything worked.
来源:https://stackoverflow.com/questions/49212298/referencing-sdl2-in-a-visual-studio-c-sharp