I am working on a Node.js module for a C colleagues library. The library is created in the form of a shared object (.so) for dynamic linking.
My CPP module file starts with
#include "path/to/lib/source/lib.h"
and built with the following wscript
def set_options(ctx): ctx.tool_options('compiler_cxx') def configure(ctx): ctx.check_tool('compiler_cxx') ctx.check_tool('node_addon') ctx.env.append_value('LINKFLAGS', ['-l:lib.so', '-L/path/to/lib.so/']) def build(ctx): t = ctx.new_task_gen('cxx', 'shlib', 'node_addon') t.source = ['module.cpp'] t.target = 'module'
When I then proceed to the call to my module, which in turn calls the library, I get the following error:
node: symbol lookup error: <path/to/module.node>: undefined symbol: <name of library call>
I tried to reset module dependencies using 'ldd module.node' and I am a bit suspicious since it does not mention my .so file.
Any help is much appreciated!
source share