如何从 node-gyp 定位 'imqi.hpp'
how to locate 'imqi.hpp' from node-gyp
我正在尝试使用 "nan" 模块从 node.js
调用 MQ_CONNECT()
见
和
https://github.com/nodejs/nan
当我使用"node-gyp"时它说找不到"imqi.hpp",MQheader
据我所知,必须在 "binding.gyp" 中提供 MQ include 的路径,我已经尝试过但没有成功:
{
"targets": [
{
"target_name": "mqconn",
"sources": [
"initall.cc",
"mqconn.cc"
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"c:\MQ\tools\cplus\include"
]
}
]
}
有人知道如何解决这个问题吗?
塞巴斯蒂安
PD.- 当然,文件就是路径所指的地方:
c:\>dir c:\MQ\tools\cplus\include\imqi.hpp
Volume in drive C is OS
Volume Serial Number is 12AA-0601
Directory of c:\MQ\tools\cplus\include
27/06/2013 02:00 1.538 imqi.hpp
因为binding.gyp在JSON中,字符串"c:\MQ\tools\cplus\include"
是一个标准的JavaScript字符串,因此\
需要转义为\
.
所以你应该将"c:\MQ\tools\cplus\include"
替换成"c:\MQ\tools\cplus\include"
。
我希望能解决问题...
我正在尝试使用 "nan" 模块从 node.js
调用 MQ_CONNECT()见
当我使用"node-gyp"时它说找不到"imqi.hpp",MQheader
据我所知,必须在 "binding.gyp" 中提供 MQ include 的路径,我已经尝试过但没有成功:
{
"targets": [
{
"target_name": "mqconn",
"sources": [
"initall.cc",
"mqconn.cc"
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"c:\MQ\tools\cplus\include"
]
}
]
}
有人知道如何解决这个问题吗? 塞巴斯蒂安
PD.- 当然,文件就是路径所指的地方:
c:\>dir c:\MQ\tools\cplus\include\imqi.hpp
Volume in drive C is OS
Volume Serial Number is 12AA-0601
Directory of c:\MQ\tools\cplus\include
27/06/2013 02:00 1.538 imqi.hpp
因为binding.gyp在JSON中,字符串"c:\MQ\tools\cplus\include"
是一个标准的JavaScript字符串,因此\
需要转义为\
.
所以你应该将"c:\MQ\tools\cplus\include"
替换成"c:\MQ\tools\cplus\include"
。
我希望能解决问题...