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步以后将会出现一个坑爹的错误:
msnodesql 0.2.1 for node.js 0.10.x

出错原因: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);

重新编译即可通过。

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

msnodesql 0.2.1 for node.js 0.10.x

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

msnodesql 0.2.1 for node.js 0.10.x

转载于:https://my.oschina.net/stdcall/blog/146378

相关文章:

  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
猜你喜欢
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-05-04
  • 2022-12-23
  • 2021-08-17
  • 2022-02-13
相关资源
相似解决方案