ALEX
ALEX

Reputation: 65

Node.JS native addons on LINUX

I learned, how to make native c++ addons for node.js, but now I want to make a compiled addon work on linux. I took .node file from the /build/Release folder (I use node-gyp for compiling) and put it in the linux folder. The addon works correctly on windows, but on linux I get this error: Error: /root/folder/addon3.node: invalid ELF header. What does this error mean and how to fix it? I use addon in this way:

const addon3 = require('./addon3.node');
let res = addon3.func(2, 1);

Upvotes: 0

Views: 20

Answers (0)

Related Questions