您的位置:首页 > 数据库

msnodesql 0.2.1 for node.js 0.10.x

2013-07-23 12:27 525 查看
msnodesql 0.2.1 需要修改源代码重新编译后才能在nodejs 0.10.x下正常使用,具体方式如下:

1.nodejs环境下使用:> npm -g install node-gyp 安装node-gyp。
2.下载node-sqlserver 源代码 git://github.com/WindowsAzure/node-sqlserver.git
3.执行配置 node-gyp configure
4.执行编译 node-gyp build
执行了上述4步以后将会出现一个坑爹的错误:



出错原因:https://github.com/WindowsAzure/node-sqlserver/issues/119

修改Operation.h 文件

int result = uv_queue_work(uv_default_loop(), &operation->work, OnBackground, OnForeground);
替换成:
int result = uv_queue_work(uv_default_loop(), &operation->work, OnBackground, (uv_after_work_cb)OnForeground);

重新编译即可通过。

如果出现无法解析的外部符号如下图:



要注意勾上链接附加依赖项的继承选项:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Nodejs SqlServer Node js