2

winhttp.h をインクルードしようとしましたが、次のエラーが発生しました。

Winhttp.h: そのようなファイルまたはディレクトリはありません

Mingw にはありません。どうすれば追加できますか?

4

3 に答える 3

3

ランタイムダイナミックリンクを使用して、必要な機能に直接リンクできます。Windows SDKに付属しているプレーンなwinhttp.hは、Microsoft固有の機能が含まれているため、使用できません。必要なヘッダーを含むVisualC++ 2010ExpressEditionを使用してコンパイルすることもできます。

お役に立てば幸いです:)

于 2010-05-03T00:21:45.287 に答える
1

Windows からヘッダーをコピーしましたが、次の追加で問題なく動作しました。

#define __in
#define __out
#define __out_bcount(x)
#define __in_ecount(x)
#define __inout
#define __out_ecount_full_opt(x)
#define __in_opt
#define __out_data_source(x)
#include <winhttp.h>

お役に立てれば。

于 2011-07-18T09:32:53.283 に答える
0
  1. GET: https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/app/org.eclipse.higgins.tcpserver/src/Third-party/VS2008/winhttp.h
  2. dlltool -z winhttp.def --export-all-symbol winhttp.dll
  3. dlltool -k -d winhttp.def -l libwinhttp.a
  4. 生成したばかりの libwinhttp.a にリンクします。
于 2013-06-13T19:06:21.717 に答える