zetsin / node-sdl2

Bindings for SDL2 in Node
54 stars 14 forks source link

Failed to run test.js #11

Open Suhail opened 5 years ago

Suhail commented 5 years ago

I get this error:

digit@mighty-dev MINGW64 ~/Desktop/workspace/node-sdl2 (master)
$ node test/test.js
C:\Users\digit\Desktop\workspace\node-sdl2\node_modules\ffi\lib\dynamic_library.js:74
    throw new Error('Dynamic Linking Error: ' + err)
    ^

Error: Dynamic Linking Error: Win32 error 126
    at new DynamicLibrary (C:\Users\digit\Desktop\workspace\node-sdl2\node_modules\ffi\lib\dynamic_library.js:74:11)
    at Object.Library (C:\Users\digit\Desktop\workspace\node-sdl2\node_modules\ffi\lib\library.js:45:12)
    at Object.<anonymous> (C:\Users\digit\Desktop\workspace\node-sdl2\dep\SDL_stdinc.js:74:5)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Module.require (internal/modules/cjs/loader.js:705:19)
    at require (internal/modules/cjs/helpers.js:14:16)

My steps were:

Tested on Windows 10 x64

--

I am getting these same errors when trying to use this module in my project.

zetsin commented 5 years ago

https://github.com/node-ffi/node-ffi/issues/294 It seems that dll is not found.

samratrocks commented 4 years ago

Leaving a comment in case anyone else finds this via online search: You'll get a linking error if you haven't already installed SDL on your system. This library provides bindings, but you'll have to have SDL installed to use this.