extern variable from one addon to another addon

11 views
Skip to first unread message

Dheeraj Singh

unread,
Aug 25, 2016, 12:10:53 AM8/25/16
to nodejs
Hi Friends,

I have created two addons, what is expected is to extern a variable from one addon to another addon.
But when I extern the global variable declared in one addon to another.
In the addon where I am doing extern, I am getting symbol not defined error for that variable.
Please help me with a solution for this.
Also I do not want to pass that variable back to JS and then pass to another addon from there because of security constraints.

Code from  Addon1.node:
char libVersion[] = "test string";

Code from Addon2.node:
extern char libVersion[];

Thanks & Regards,
Dheeraj

Ben Noordhuis

unread,
Aug 26, 2016, 8:37:43 AM8/26/16
to nod...@googlegroups.com
There is some discussion about that here:
https://github.com/nodejs/node-gyp/issues/1007
Reply all
Reply to author
Forward
0 new messages