I've created a C++ program on Windows 7 in Visual Studio 2015 which uses EnumProcessModules. When I compile it in VS2015 it succeeds.
Now, I created an C++ addon in Node.js which includes the above code (EnumProcessModules).
when I compile it from command line (by running node-gyp build ), I get the following error:
LINK : fatal error LNK1181: cannot open input file 'psapi.dll' [C:\Users\Yoni\W
ebstormProjects\my_prog\build\getProcesses.vcxproj]
psapi.dll exists at
C:\Users\Yoni\WebstormProjects\my_prog\
I took it from C:\\Windows\\System32\\
And this is my binding.gyp code:
{
"targets": [
{
"target_name": "getProcesses",
"sources": [ "psInfo.cc", "json.hpp" ],
"libraries": [ "psapi.dll" ]
}
]
}
How to resolve this?
Thx for the help.
我相信您需要在"libraries"
列表中使用"psapi.lib"
而不是"psapi.dll"
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.