Error: dlopen ... Symbol not found

1,063 views
Skip to first unread message

Matthew

unread,
Jun 23, 2010, 1:06:30 AM6/23/10
to nodejs
Hello,

I'm building my first node addon, which includes bindings for Berkeley
XML DB. The addon builds fine (on OS X 10.6) but when I try and run a
test js file, I get the follow error - any idea why?

$ node test.js

module:318
process.dlopen(filename, this.exports);
^
Error: dlopen(/Users/mattcg/Source/node_dbxml/binding.node, 1): Symbol
not found: __ZTIN5DbXml12XmlExceptionE
Referenced from: /Users/mattcg/Source/node_dbxml/binding.node
Expected in: flat namespace
in /Users/mattcg/Source/node_dbxml/binding.node
at Module._loadObjectSync (module:318:11)
at Module.loadSync (module:294:10)
at loadModule (module:241:16)
at require (module:364:12)
at Object.<anonymous> (/Users/mattcg/Source/node_dbxml/dbxml.js:
1:77)
at Module._compile (module:384:23)
at Module._loadScriptSync (module:393:8)
at Module.loadSync (module:296:10)
at loadModule (module:241:16)
at require (module:364:12)

Isaac Schlueter

unread,
Jun 23, 2010, 1:46:56 AM6/23/10
to Matthew, nod...@googlegroups.com
Is the code on github or someplace? If you send a link, you'll
probably get more help.

--i

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>

Matthew

unread,
Jun 23, 2010, 1:57:58 AM6/23/10
to nodejs

Isaac Z. Schlueter

unread,
Aug 12, 2010, 10:24:40 PM8/12/10
to nodejs
Did you get this resolved? I'm running into the same error myself now
on a different addon.

--i

Isaac Z. Schlueter

unread,
Aug 12, 2010, 10:56:52 PM8/12/10
to nodejs
Oh, I figured this out.

For the next traveler who comes looking:

The constructor template has to be declared at the top-level scope.
For example:
http://github.com/pkrumins/node-async/blob/bc4ffffbce1aece76767c8ed1215efdeb4630cb6/async.cpp#L91

--i
Reply all
Reply to author
Forward
0 new messages