node.js - node-hid building for mac os x 10.9.5 -


having problem building / usage node-hid on mac os x 10.9.5. build went fine node-gyp. had hidapi warnings:

gyp info spawn args [ 'buildtype=release', '-c', 'build' ]   cc(target) release/obj.target/hidapi/hidapi/mac/hid.o   ../hidapi/mac/hid.c:255:20: warning: comparison of integers of different signs:   'cfindex' (aka 'long') , 'size_t' (aka 'unsigned long') [-wsign-compare]             if (chars_copied == len)                 ~~~~~~~~~~~~ ^  ~~~   ../hidapi/mac/hid.c:295:20: warning: comparison of integers of different signs:   'cfindex' (aka 'long') , 'size_t' (aka 'unsigned long') [-wsign-compare]             if (used_buf_len == len)                 ~~~~~~~~~~~~ ^  ~~~ 2 warnings generated. 

but test example gives dyld error:

sh# node src/show-devices.js dyld: lazy symbol binding failed: symbol not found: _iohidmanagercreate   referenced from: /users/me/documents/node-hid-master/build/release/hid.node   expected in: dynamic lookup 

why iokit wasn't found? in advance

bug in binding.gyp file

changed following

  'conditions': [     [ 'os=="mac"', {       'ldflags': [         '-framework iokit',         '-framework corefoundation'       ],       'xcode_settings': {         'gcc_enable_cpp_exceptions': 'yes',       }     }], 

to this

  'conditions': [     [ 'os=="mac"', {       'ldflags': [         '-framework iokit',         '-framework corefoundation'       ],       'xcode_settings': {         'gcc_enable_cpp_exceptions': 'yes',         'other_ldflags': [           '-framework iokit',           '-framework corefoundation'         ],           }     }], 

and works now


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -