无法包含 winhttp.h(带有代码::blocks/mingw)c++
我一直在尝试包含 winhttp.h 并且收到此错误:
Winhttp.h:没有这样的文件或目录
Mingw 没有它,我该如何添加它?
I've been trying to include winhttp.h and I get this error:
Winhttp.h: No such file or directory
Mingw doesn't have it, how would I add it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用运行时动态链接来链接到直接选择您想要的功能。您不能使用 Windows SDK 附带的普通 winhttp.h,因为它包含 Microsoft 特定的功能。您还可以使用 Visual C++ 2010 Express Edition 进行编译,其中包含您想要的标头。
希望有帮助:)
You can use runtime dynamic linking to link to the function(s) you want directly. You can't use the plain winhttp.h that ships with the Windows SDK because it contains Microsoft-specific features. You could also compile with Visual C++ 2010 Express Edition which would include the header you want.
Hope that helps :)
我已经从 Windows 复制了标头,并且通过添加以下内容可以正常工作:
希望这会有所帮助。
I have copied the header from windows and it worked fine with the following addition:
hope this helps.
dlltool -z winhttp.def --export-all-symbol winhttp.dll
dlltool -k -d winhttp.def -l libwinhttp.a
dlltool -z winhttp.def --export-all-symbol winhttp.dll
dlltool -k -d winhttp.def -l libwinhttp.a