-1

I am trying to run with Electron a C++ addon that links to the openssl library. When the C++ code tries to access the library I get an exception: Procedure not found. I found another similar question here, but I could not manage to make it work, as the original poster said it would. I tried to link to a static compiled library from here, specifically libeay32MT.lib but when running under Electron it still crashes.

In bindings.gyp I have the library added like this:

"-l$(OPENSSL_ROOT)/lib/libeay32MT.lib"

Any ideas how I can make this work?

Community
  • 1
  • 1
saw66
  • 19
  • 5
  • `-l` requires something like `-l32MT` and a search path specified with `-L` to find that. – πάντα ῥεῖ Feb 17 '17 at 19:02
  • but it's an absolute path. shouldn't it work? I tried without the -l also. I don't get any compilation error, just runtime when I try to access stuff from the lib. – saw66 Feb 17 '17 at 19:35

1 Answers1

0

I managed to find the problem: I was also linking to node.lib inside the bindings.gyp. It wasn't necessary, but I "inherited" it from the Visual Studio proj file, where the node.lib was mandatory in order to compile the addon for node.

After removing the unnecessary library link to node.lib from the bindings.gyp the electron app worked just fine.

saw66
  • 19
  • 5