Questions tagged [node-native-addon]
22 questions
0
votes
0 answers
How do native addons affect node.js program?
I have such codes:
const test = require('./build/Release/test');
console.time('js');
console.log(f(0, 0, 1000, 1000, 50.6));
console.timeEnd('js');
console.time('c++');
console.log(test.sum(0, 0, 1000, 1000, 50.6));
console.timeEnd('c++');
const…

ALEX
- 55
- 2
- 8
0
votes
0 answers
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…

ALEX
- 55
- 2
- 8
0
votes
1 answer
How to tell a native node module where the needed dlls are stored?
I am currently developing a native node module for the use in Node.Js and Electron that needs additional dlls to work (and whatever the equivalent on Linux and Mac would be).
I'm not really into C++ development and i didn't find a solution to this…

Mayor Mayer
- 150
- 2
- 12
0
votes
1 answer
Why can't N-API find some bindings when using napi_property_descriptor array?
I have the following code...
// robot_node.c
#include
#include
#include "robot_node.h"
#include "robot.h"
napi_value node_forward(napi_env env, napi_callback_info info){
napi_value result;
napi_status status;
int…

Jackie
- 21,969
- 32
- 147
- 289
0
votes
2 answers
Node-gyp Library not loaded: /usr/local/lib/libmtp.9.dylib
I have been attempting to make a nodejs-native-addon which uses libmtp to carry out certain functions. I have been successful in the building the app but the app is throwing Library not loaded: /usr/local/lib/libmtp.9.dylib. Referenced from:…

Ganesh Rathinavel
- 1,243
- 4
- 17
- 38
-1
votes
1 answer
What should be the correct way to send to the front-end the napi_values I receive from the native-addon?
I am trying to communicate this native addon with the front-end. It consists of a prime number generator, when it is executed it writes to the console, I want it to send them via Sockets to the browser console.
With this code I invoke the addon and…

JaredOrtega
- 3
- 3
-2
votes
1 answer
Why do I get segmentation faults for the subject line
I'm creating a native node extension for RocksDB, I've pinned down an issue which I can not explain. So I have the following perfectly functioning piece of code:
std::string v;
ROCKSDB_STATUS_THROWS(db->Get(*options, k, &v));
napi_value…

Lu4
- 14,873
- 15
- 79
- 132