Every time I try to execute the code, it will start then about a second later it crashes with this error.
Unable to load DLL 'SDL2': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
I've tried putting the .dll in ссылки в основной папке проекта в виде файла .cs + «Копировать в выходной каталог» на «Копировать, если новый». I've tried setting the project to x64 and x86.
Used: https://github.com/flibitijibibo/SDL2-CS also used it from NuGet.
Someone help me.
Using Windows 10.
SDL.SDL_Init(SDL.SDL_INIT_AUDIO); // Crashes on this line
SDL.SDL_WindowFlags flags = 0;
if (resizable)
flags = SDL.SDL_WindowFlags.SDL_WINDOW_RESIZABLE;
var window = IntPtr.Zero;
window = SDL.SDL_CreateWindow(
windowTitle,
windowX,
windowY,
windowWidth,
windowHeight,
flags
);
SDL.SDL_Delay(3000);
SDL.SDL_DestroyWindow(window);
SDL.SDL_Quit();