I'm working on a Node.js wrapper module for a colleagues C library. The library is created in Shared Object (.so) form for dynamic linking.
My CPP module file begins with
#include "path/to/lib/source/lib.h"
and is 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 call into my module, which in turns call the library, i get the following error:
node: symbol lookup error: <path/to/module.node>:
undefined symbol: <name of library call>
I tried dumping the dependencies of the module with 'ldd module.node' and I got a little suspicious as it doesn't mention my .so file.
Any help is much appreciated!