Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A dynamic link library (DLL) initialization routine failed. #99

Open
Rehoni opened this issue May 24, 2018 · 1 comment
Open

A dynamic link library (DLL) initialization routine failed. #99

Rehoni opened this issue May 24, 2018 · 1 comment

Comments

@Rehoni
Copy link

Rehoni commented May 24, 2018

When i using zerorpc in my electron app, it throws an Exception:

"Error: A dynamic link library (DLL) initialization routine failed.\\?\f:GithubDIPelectronUI\node_moduleszmq\buildReleasezmq.node    
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20)    
at Object.Module._extensions..node (module.js:671:18)    
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:172:20)    
at Module.load (module.js:561:32)    
at tryModuleLoad (module.js:504:12)    
at Function.Module._load (module.js:496:3)    
at Module.require (module.js:586:17)   
at require (internal/module.js:11:18)    
at bindings (f:GithubDIPelectronUI\node_modules\bindings\bindings.js:76:44)    
at Object.<anonymous> (f:GithubDIPelectronUI\node_moduleszmqlibindex.js:6:30)"

My computer path, (and i'm using vscode to develop and debug my electron apps):
[email protected]
[email protected]
[email protected]
[email protected]
windows@10 Enterprise
visual studio@2017

I think the reason may be this.
image

There throws a lot of warning about the process of node-gyp compiling the ZeroMQ lib, and i guess if i solved these warnings, the DDL Error would be solved also?

And i'll appreciate if there got another solution for this DDL Error! (:з)∠)

@crifan
Copy link

crifan commented Jan 20, 2020

Reason:
node\_modules\\zerorpc\\node\_modules\\zeromq\\lib\\index.js

var EventEmitter = require('events').EventEmitter
  , zmq = require('../build/Release/zmq.node')
  , util = require('util');

this line:

zmq = require('../build/Release/zmq.node')

support: Linux/Mac
not support: Win

Solution:
Change
node\_modules\\zerorpc\\node\_modules\\zeromq\\lib\\index.js
from

var EventEmitter = require('events').EventEmitter
  , zmq = require('../build/Release/zmq.node')
  , util = require('util');

to:

var EventEmitter = require('events').EventEmitter

let path = require('path')
let zmqNodePath = path.join("..", "build", "Release", "zmq.node")
var zmq = require(zmqNodePath)

var util = require('util')

can support Linux/Mac/Win, and could find the zmq.node dll lib file.

detailed info please refer my Chinese post:
【已解决】windows中启动Electron-python报错:Uncaught Error A dynamic link library DLL initialization routine failed zerorpc  zeromq zmq.node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants