Is there no way to specify the library search path from within the 
binding.gyp file? I'm just trying to see if it's possible to make `node-gyp 
configure` spit `-L/usr/local/hdf5/lib` out into the Makefile, or whatever 
it builds.

I'll be searching the docs, but I haven't run across it yet. I'll let you 
know if I find something.

Ryan

On Sunday, April 22, 2012 11:13:33 AM UTC-5, rhasson wrote:
>
> Just to add to Nathan's comments, you're missing a "libraries" that points 
> to the the HDF5 shared library that was compiled separately.  for example: 
>  'libraries': ['/home/user/hdf5/lib/hdf5.so']
>
> Also, I noticed that when compiling with node-gyp (which I love btw) you 
> need to set LD_LIBRARY_PATH environment variable to the directory where the 
> HDF5 shared library is located.  for example:   
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/hdf5/lib
>
> after you do that, try building your project again.
>
> Roy
>
> On Saturday, April 21, 2012 9:50:49 PM UTC-4, Ryan Cole wrote:
>>
>> Hello,
>>
>> I'm learning how to write C++ modules, for Node.js. I'm sort of 
>> brute-forcing my learning by looking at examples, referencing the 
>> documentation for v8 and trial and error. The only two modules that I can 
>> seem to think of, as a reference, are hiredis-node and node.bcrypt.js. Both 
>> have helped me get to where I am now, which is able to compile a base 
>> skeleton module, using node-gyp. Are there any other modules that are 
>> written in C++ that would be simple + good to reference?
>>
>> For example, I'm currently trying to write a module that simply wraps and 
>> exposes a class from an existing third-party lib, HDF5. I've got it all 
>> written to the point where I think I am supposed to initialize an object of 
>> that class I want to expose, but when I include the code to initialize it, 
>> I cannot `require` it from within Node. It will compile, but I cannot 
>> require it. I do not think it is actually compiling properly. The HDF5 lib 
>> comes with a special wrapper binary around g++ that sets up the compile 
>> environment for you, so I guess I need to figure out how to tell node-gyp 
>> to use that.
>>
>> My code is here, if anyone wants to take a peek: 
>> https://github.com/ryancole/node-hdf5
>>
>> Thanks
>>
>

-- 
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