Ben, thanks so much for the help - I finally seem to have gotten things working (or they appear to be). It was a matter of not really knowing what I was doing in Gyp, and was linking to my files wrong. I finally ended up building verbosely and comparing what g++ was doing for each project and just throwing the arguments I was missing into the libraries array in the "binding.gyp" file, and it all worked!

thanks again! Still not QUITE sure how it's all linking, but I have more of a clue now. Despite the frustration, I learned a lot for a noob to all of this! Working as well as it did seemed to be a red herring, oh well

Before:
  "targets": [
    {
        "target_name": "proj",
        "sources": [ "proj.cpp" ],
        "include_dirs": [ "./Include"],
        "libraries": ["../shared/libOpenNI2.so"]
    }

After:

  "targets": [
    {
        "target_name": "proj",
        "sources": [ "proj.cpp" ],
        "include_dirs": [ "./Include"],
        "libraries": ["-lOpenNI2", "-Wl,-rpath ./"]
    }



On 01/08/2013 10:46 AM, Ben Noordhuis wrote:
On Tue, Jan 8, 2013 at 3:22 PM, Benjamin Farrell <[email protected]> wrote:
Awesome, I appreciate it!  Onto the OpenNI forums!  If anybody knows
otherwise I'd love to hear it so I'm not banging my head against the wall
needlessly.  And honestly this is great news - I'm glad it wasn't what I was
afraid of - that this wasn't going to be possible in Node for some silly
reason.
There's one thing to keep in mind if the exceptions you mentioned are
C++ exceptions: node.js itself doesn't use them - and is in fact
compiled with -fno-rtti -fno-exceptions - so you need to catch any and
all exceptions that library code throws.  If you let one through,
node.js (or rather, the C++ runtime) will abort.

I didn't think of it yesterday, but if OpenNI throws an exception at
dlopen() time (e.g. from a static constructor), it's game over.  That
would be a moronic thing to do, though.  For one, you'd almost
certainly leave the dynamic linker in an undefined state.


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to