{"action":"created","issue":{"url":"https://api.github.com/repos/charto/nbind/issues/30","repository_url":"https://api.github.com/repos/charto/nbind","labels_url":"https://api.github.com/repos/charto/nbind/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/charto/nbind/issues/30/comments","events_url":"https://api.github.com/repos/charto/nbind/issues/30/events","html_url":"https://github.com/charto/nbind/issues/30","id":184299874,"number":30,"title":"Multiple native modules failure.","user":{"login":"kenOfYugen","id":5251559,"avatar_url":"https://avatars.githubusercontent.com/u/5251559?v=3","gravatar_id":"","url":"https://api.github.com/users/kenOfYugen","html_url":"https://github.com/kenOfYugen","followers_url":"https://api.github.com/users/kenOfYugen/followers","following_url":"https://api.github.com/users/kenOfYugen/following{/other_user}","gists_url":"https://api.github.com/users/kenOfYugen/gists{/gist_id}","starred_url":"https://api.github.com/users/kenOfYugen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenOfYugen/subscriptions","organizations_url":"https://api.github.com/users/kenOfYugen/orgs","repos_url":"https://api.github.com/users/kenOfYugen/repos","events_url":"https://api.github.com/users/kenOfYugen/events{/privacy}","received_events_url":"https://api.github.com/users/kenOfYugen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-20T18:04:23Z","updated_at":"2016-10-21T20:11:49Z","closed_at":null,"body":"I have written two native modules using `nbind`.\r\nEach module is exposed via an `index.js` file like so:\r\n```javascript\r\nvar nbind = require('nbind');\r\n\r\nvar binding = nbind.init(__dirname);\r\nvar lib = binding.lib;\r\n\r\nmodule.exports = lib\r\n```\r\nWhen I require one of them, they both work as expected. Whenever I require both of them at the same time, hell breaks loose.\r\n```javascript\r\nbinaryTreesCPP = require('./benchmarks/binary-trees/native-cpp');\r\nbinaryTreesC = require('./benchmarks/binary-trees/native-c');\r\n```\r\ncauses:\r\n```\r\n$ node bench.js \r\n/home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/node_modules/nbind/dist/nbind.js:145\r\n    binding.bind = lib.NBind.bind_value;\r\n                            ^\r\n\r\nTypeError: Cannot read property 'bind_value' of undefined\r\n    at initNode (/home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/node_modules/nbind/dist/nbind.js:145:29)\r\n    at /home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/node_modules/nbind/dist/nbind.js:114:13\r\n    at findCompiledModule (/home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/node_modules/nbind/dist/nbind.js:78:13)\r\n    at find (/home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/node_modules/nbind/dist/nbind.js:92:13)\r\n    at Object.init (/home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/node_modules/nbind/dist/nbind.js:103:5)\r\n    at Object.<anonymous> (/home/ken/Desktop/node-benchmarks/benchmarks/binary-trees/native-c/index.js:3:21)\r\n    at Module._compile (module.js:570:32)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n```"},"comment":{"url":"https://api.github.com/repos/charto/nbind/issues/comments/255454178","html_url":"https://github.com/charto/nbind/issues/30#issuecomment-255454178","issue_url":"https://api.github.com/repos/charto/nbind/issues/30","id":255454178,"user":{"login":"jjrv","id":778781,"avatar_url":"https://avatars.githubusercontent.com/u/778781?v=3","gravatar_id":"","url":"https://api.github.com/users/jjrv","html_url":"https://github.com/jjrv","followers_url":"https://api.github.com/users/jjrv/followers","following_url":"https://api.github.com/users/jjrv/following{/other_user}","gists_url":"https://api.github.com/users/jjrv/gists{/gist_id}","starred_url":"https://api.github.com/users/jjrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjrv/subscriptions","organizations_url":"https://api.github.com/users/jjrv/orgs","repos_url":"https://api.github.com/users/jjrv/repos","events_url":"https://api.github.com/users/jjrv/events{/privacy}","received_events_url":"https://api.github.com/users/jjrv/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T20:11:49Z","updated_at":"2016-10-21T20:11:49Z","body":"I think this is now fixed in the `develop` branch:\r\n\r\nhttps://github.com/charto/nbind/tree/develop\r\n\r\nCan you verify? I can't get your example to work (`run` and `boost::system` are not found when loading the addon due to some linker parameter issue).\r\n"}}
{"actor":{"display_login":"jjrv"}}