Hi:
   I just gave the new gyp build tool a try to build my GeoIP binding for
node, It seems that the building process was successful. But when I try to
require the binding in REPL, I got the follow error message:

-------------------------------------------------------------------------------------------------------------------------------------------------------------

   > var binding = require('./geoip.node')
Error: Unable to load shared library
/home/kuno/Code/repository/geoip/build/Release/lib.target/geoip.node
    at Object..node (module.js:472:11)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at repl:1:15
    at REPLServer.eval (repl.js:80:21)
    at repl.js:190:20
    at REPLServer.eval (repl.js:87:5)
    at Interface.<anonymous> (repl.js:182:12)
------------------------------------------------------------------------------------------------------------------------------------------------------------

Here is my binding.gyp file, use node-ffi's binding.gyp as a template...

------------------------------------------------------------------------------------------------------------------------------------------------------------
{
  'targets': [
    {
      'target_name': 'geoip',
      'type': 'shared_library',
      'sources': [
          'src/init.cc'
        , 'src/country.cc','src/country6.cc'
        , 'src/city.cc','src/city6.cc'
        , 'src/org.cc','src/region.cc'
        , 'src/netspeed.cc', 'src/utils.cc'
      ],
      'include_dirs': [
          'deps/geoip/libGeoIP'
      ],
      'dependencies': [
      ],
      'conditions': [
        ['OS=="win"', {
          'libraries': [
          ],
          'dependencies': [
          ]
        }, {
          'libraries': [
          ],
        }],
        ['OS=="mac"', {
          'xcode_settings': {
            'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
            'MACOSX_DEPLOYMENT_TARGET': '10.5',
            'OTHER_CFLAGS': [
                '-ObjC++'
            ]
          },
          'libraries': [
              '-lobjc'
          ],
        }]
      ]
    },
  ]
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Any suggestion/advice is appreciated.

The full details can be check at the gyp branch of my GeoIP repository at
github:

https://github.com/kuno/GeoIP/tree/gyp

Best

--kuno

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