C++ 在windows上安装节点gd
在过去的几个小时里,我尝试在windows上运行C++ 在windows上安装节点gd,c++,node.js,gd,native,node-gyp,C++,Node.js,Gd,Native,Node Gyp,在过去的几个小时里,我尝试在windows上运行node gd。我试过几次回购,终于找到了。当我跑的时候 `npm install node-gd` 我得到以下错误: node-gyp rebuild ...node_modules\node-gd>node "C:\Program Files\nodejs\node_modules\npm\ bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild B
node gd
。我试过几次回购,终于找到了。当我跑的时候
`npm install node-gd`
我得到以下错误:
node-gyp rebuild
...node_modules\node-gd>node "C:\Program Files\nodejs\node_modules\npm\
bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
node-gd.cpp
..\cpp\node-gd.cpp(17): fatal error C1083: Cannot open include file: 'gd.h': No
such file or directory [...\node_modules\node-gd\build\node_gd.vcxproj
]
我想我应该安装gd
lib,但是当我在谷歌上搜索它时,几乎所有的信息都是关于php\u gd
的,而不是关于lib本身
我应该把gd
文件放在哪里
编辑:我编译了它!现在我得到:
我最近经历了这个过程,遇到了同样的问题,但没有找到任何解决问题的步骤。我意识到这个线程现在已经有将近1.5年的历史了,但是我会在这里发布我的完整安装步骤,希望它能帮助其他人 这假设您已经构建了GD库(),并且将使用GD DLL
"libraries": ["-lgd"],
编译的GD DLL导入库的名称,例如“libgd.lib”:
检查这个@vinayr现在我得到了
链接:致命错误LNK1181:无法打开输入文件'gd.lib'[…\node\u m odules\node gd\build\node\u gd.vcxproj]
@Deepsy:找到解决方案了吗?没有。我切换到节点画布,但仍然无法让它工作。所以我浏览了我的旧问题,发现我没有标记这个。我将把这个标记为答案,因为这是一个可能的解决方案。谢谢你的努力。别忘了在新的Windows机器上安装VisualC++ +可再分发包,或者错误的模块NoDEG.G.D。
"libraries": ["-llibgd"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"(path_to_gd)/src" # <-- THIS ENTRY
],
"conditions": [
[ "OS=='freebsd'", {
"libraries": ["-L/usr/local/lib"],
"include_dirs": ["/usr/local/include"]
}],
[ "OS=='mac'", {
"libraries": ["-L/usr/local/lib", "-L/opt/local/lib"],
"include_dirs": ["/usr/local/include", "/opt/local/include"]
}],
[ "OS=='win'", { # <-- THIS ENTRY
"msvs_settings": {
"VCLinkerTool": {
"AdditionalOptions": ["/LIBPATH:(path_to_gd)/build_msvc12_x64"],
},
},
}],
]
npm install (downloads_folder)\node-gd
copy (path_to_gd)\build_msvc12_x64\libgd.dll (path_to_node_modules)\node-gd\build\Release\libgd.dll