I try figure out, why gcc/g++ compiler throw error likie this:
.\http.cpp: In function 'int main()':.\http.cpp:14:5: error: 'WinHttpOpen' was not declared in this scope WinHttpOpen( L"A WinHTTP Example Program/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
Below i put my code. It is pretty weird, because i wrote that code according to in MSDN Documentation.
#include <stdio.h>#include <winhttp.h>#pragma comment(lib, "winhttp.lib");using namespace std;int main(void){ bool bResults = false; // HINTERNET hSession = NULL; // HINTERNET hConnect = NULL; // HINTERNET hRequest = NULL; // Use WinHttpOpen to obtain a session handle. WinHttpOpen( L"A WinHTTP Example Program/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); // Specify an HTTP server. // if (hSession) // hConnect = WinHttpConnect( hSession, L"www.wp.pl", // INTERNET_DEFAULT_HTTP_PORT, 0); // // Create an HTTP Request handle. // if (hConnect) // hRequest = WinHttpOpenRequest( hConnect, L"GET", // L"/writetst.txt", // NULL, WINHTTP_NO_REFERER, // WINHTTP_DEFAULT_ACCEPT_TYPES, // 0); // Send a Request. // if (hRequest) // bResults = WinHttpSendRequest( hRequest, // WINHTTP_NO_ADDITIONAL_HEADERS, // 0, WINHTTP_NO_REQUEST_DATA, 0, // 0, 0); // Place additional code here. // Report errors. // if (!bResults) // printf("Error %d has occurred.\n",GetLastError()); // // Close open handles. // if (hRequest) WinHttpCloseHandle(hRequest); // if (hConnect) WinHttpCloseHandle(hConnect); // if (hSession) WinHttpCloseHandle(hSession); return 0;}
Do you have any suggestion?I commented out part of code, but it really doesn't matter, error is always the same.
edit:
Operation system: Windows 10 x64,
IDE: Visual Studio Code,
Compiler: gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)
I followed for suggestion @Han and i have code like below:
#include <stdio.h>#include <winhttp.h>#include <windows.h>#include <wininet.h>int main(void){ HINTERNET hSession = NULL; // here is problem HINTERNET hConnect = NULL; // here is problem HINTERNET hRequest = NULL; // here is problem bool bResults = false; // Use WinHttpOpen to obtain a session handle. WinHttpOpen( L"A WinHTTP Example Program/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); return 0;}
Note: if i delete HINSTANCE variables, compiler will work correctly, but if i add those variables, compiler will throw an exception like below:
PS > g++.exe .\http.cpp -o http.exe -lwinhttpIn file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:32:9: error: 'LPVOID' does not name a type; did you mean 'VOID'? typedef LPVOID HINTERNET; ^~~~~~ VOIDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:33:9: error: 'HINTERNET' does not name a type; did you mean 'INTERNETAPI'? typedef HINTERNET *LPHINTERNET; ^~~~~~~~~ INTERNETAPIC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:38:9: error: 'WORD' does not name a type; did you mean 'HIWORD'? typedef WORD INTERNET_PORT; ^~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:39:9: error: 'INTERNET_PORT' does not name a type; did you mean 'INTERNETAPI_'? typedef INTERNET_PORT *LPINTERNET_PORT; ^~~~~~~~~~~~~ INTERNETAPI_In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:465:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwStructSize; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:466:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszScheme; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:467:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwSchemeLength; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:469:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszHostName; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:470:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwHostNameLength; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:471:5: error: 'INTERNET_PORT' does not name a type; did you mean 'INTERNETAPI_'? INTERNET_PORT nPort; ^~~~~~~~~~~~~ INTERNETAPI_C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:472:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszUserName; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:473:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwUserNameLength; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:474:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszPassword; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:475:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwPasswordLength; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:476:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszUrlPath; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:477:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwUrlPathLength; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:478:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszExtraInfo; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:479:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwExtraInfoLength; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:486:5: error: 'DWORD_PTR' does not name a type DWORD_PTR dwResult; ^~~~~~~~~C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:487:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwError; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:492:5: error: 'FILETIME' does not name a type; did you mean 'ETIME'? FILETIME ftExpiry; ^~~~~~~~ ETIMEC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:493:5: error: 'FILETIME' does not name a type; did you mean 'ETIME'? FILETIME ftStart; ^~~~~~~~ ETIMEC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:494:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszSubjectInfo; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:495:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszIssuerInfo; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:496:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszProtocolName; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:497:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszSignatureAlgName; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:498:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszEncryptionAlgName; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:499:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwKeySize; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:504:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwAccessType; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:505:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszProxy; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:506:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszProxyBypass; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:513:5: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL fAutoDetect; ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:514:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszAutoConfigUrl; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:515:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszProxy; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:516:5: error: 'LPWSTR' does not name a type; did you mean 'LPTR'? LPWSTR lpszProxyBypass; ^~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:519:15: error: typedef 'VOID' is initialized (use decltype instead) typedef VOID (CALLBACK *WINHTTP_STATUS_CALLBACK)(HINTERNET,DWORD_PTR,DWORD,LPVOID,DWORD); ^~~~~~~~C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:519:15: error: 'CALLBACK' was not declared in this scopeC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:519:15: note: the macro 'CALLBACK' had not yet been definedIn file included from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/windef.h:8, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/windows.h:69, from .\http.cpp:3:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:90: note: it was later defined here #define CALLBACK __stdcallIn file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:519:25: error: 'WINHTTP_STATUS_CALLBACK' was not declared in this scope typedef VOID (CALLBACK *WINHTTP_STATUS_CALLBACK)(HINTERNET,DWORD_PTR,DWORD,LPVOID,DWORD); ^~~~~~~~~~~~~~~~~~~~~~~C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:519:25: note: suggested alternative: 'WINHTTP_OPTION_CALLBACK' typedef VOID (CALLBACK *WINHTTP_STATUS_CALLBACK)(HINTERNET,DWORD_PTR,DWORD,LPVOID,DWORD); ^~~~~~~~~~~~~~~~~~~~~~~ WINHTTP_OPTION_CALLBACKC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:531:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwFlags; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:532:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwAutoDetectFlags; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:533:5: error: 'LPCWSTR' does not name a type; did you mean 'LPTR'? LPCWSTR lpszAutoConfigUrl; ^~~~~~~ LPTRC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:534:5: error: 'LPVOID' does not name a type; did you mean 'VOID'? LPVOID lpvReserved; ^~~~~~ VOIDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:535:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwReserved; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:536:5: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL fAutoLogonIfChallenged; ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:541:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwMajorVersion; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:542:5: error: 'DWORD' does not name a type; did you mean 'HIWORD'? DWORD dwMinorVersion; ^~~~~ HIWORDC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:558:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpAddRequestHeaders(HINTERNET,LPCWSTR,DWORD,DWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:559:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpDetectAutoProxyConfigUrl(DWORD,LPWSTR*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:560:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpCheckPlatform(void); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:561:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpCloseHandle(HINTERNET); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:562:1: error: 'HINTERNET' does not name a type; did you mean 'INTERNETAPI'? HINTERNET WINAPI WinHttpConnect(HINTERNET,LPCWSTR,INTERNET_PORT,DWORD); ^~~~~~~~~ INTERNETAPIC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:563:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpCrackUrl(LPCWSTR,DWORD,DWORD,LPURL_COMPONENTS); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:564:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpCreateUrl(LPURL_COMPONENTS,DWORD,LPWSTR,LPDWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:565:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpGetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:566:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpGetIEProxyConfigForCurrentUser(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:567:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpGetProxyForUrl(HINTERNET,LPCWSTR,WINHTTP_AUTOPROXY_OPTIONS*,WINHTTP_PROXY_INFO*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:568:1: error: 'HINTERNET' does not name a type; did you mean 'INTERNETAPI'? HINTERNET WINAPI WinHttpOpen(LPCWSTR,DWORD,LPCWSTR,LPCWSTR,DWORD); ^~~~~~~~~ INTERNETAPIC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:569:1: error: 'HINTERNET' does not name a type; did you mean 'INTERNETAPI'? HINTERNET WINAPI WinHttpOpenRequest(HINTERNET,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR*,DWORD); ^~~~~~~~~ INTERNETAPIC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:570:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpQueryAuthParams(HINTERNET,DWORD,LPVOID*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:571:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpQueryAuthSchemes(HINTERNET,LPDWORD,LPDWORD,LPDWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:572:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpQueryDataAvailable(HINTERNET,LPDWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:573:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpQueryHeaders(HINTERNET,DWORD,LPCWSTR,LPVOID,LPDWORD,LPDWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:574:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpQueryOption(HINTERNET,DWORD,LPVOID,LPDWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:575:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpReadData(HINTERNET,LPVOID,DWORD,LPDWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:576:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpReceiveResponse(HINTERNET,LPVOID); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:577:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpSendRequest(HINTERNET,LPCWSTR,DWORD,LPVOID,DWORD,DWORD,DWORD_PTR); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:578:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpSetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:579:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpSetCredentials(HINTERNET,DWORD,DWORD,LPCWSTR,LPCWSTR,LPVOID); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:580:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpSetOption(HINTERNET,DWORD,LPVOID,DWORD); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:581:1: error: 'WINHTTP_STATUS_CALLBACK' does not name a type; did you mean 'WINHTTP_OPTION_CALLBACK'? WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET,WINHTTP_STATUS_CALLBACK,DWORD,DWORD_PTR); ^~~~~~~~~~~~~~~~~~~~~~~ WINHTTP_OPTION_CALLBACKC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:582:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpSetTimeouts(HINTERNET,int,int,int,int); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:583:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpTimeFromSystemTime(const SYSTEMTIME *,LPWSTR); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:584:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpTimeToSystemTime(LPCWSTR,SYSTEMTIME*); ^~~~~~~ V_BOOLC:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:585:1: error: 'WINBOOL' does not name a type; did you mean 'V_BOOL'? WINBOOL WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD); ^~~~~~~ V_BOOLIn file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:123:91: error: expected identifier before numeric constant INTERNET_SCHEME_PARTIAL = -2,INTERNET_SCHEME_UNKNOWN = -1,INTERNET_SCHEME_DEFAULT = 0,INTERNET_SCHEME_FTP,INTERNET_SCHEME_GOPHER, ^~~~~~~~~~~~~~~~~~~C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:123:91: error: expected '}' before numeric constantIn file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:122:16: note: to match this '{' typedef enum { ^In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:123:91: error: expected unqualified-id before numeric constant INTERNET_SCHEME_PARTIAL = -2,INTERNET_SCHEME_UNKNOWN = -1,INTERNET_SCHEME_DEFAULT = 0,INTERNET_SCHEME_FTP,INTERNET_SCHEME_GOPHER, ^~~~~~~~~~~~~~~~~~~In file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:127:20: error: expected unqualified-id before ',' token } INTERNET_SCHEME,*LPINTERNET_SCHEME; ^C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:127:22: error: 'INTERNET_SCHEME* LPINTERNET_SCHEME' redeclared as different kind of symbol } INTERNET_SCHEME,*LPINTERNET_SCHEME; ^~~~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:46:31: note: previous declaration 'typedef int* LPINTERNET_SCHEME' typedef int INTERNET_SCHEME, *LPINTERNET_SCHEME; ^~~~~~~~~~~~~~~~~In file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:224:5: error: conflicting declaration 'typedef struct HTTP_VERSION_INFO HTTP_VERSION_INFO' } HTTP_VERSION_INFO,*LPHTTP_VERSION_INFO; ^~~~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:543:3: note: previous declaration as 'typedef struct HTTP_VERSION_INFO HTTP_VERSION_INFO' } HTTP_VERSION_INFO, *LPHTTP_VERSION_INFO; ^~~~~~~~~~~~~~~~~In file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:224:24: error: conflicting declaration 'typedef struct HTTP_VERSION_INFO* LPHTTP_VERSION_INFO' } HTTP_VERSION_INFO,*LPHTTP_VERSION_INFO; ^~~~~~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:543:23: note: previous declaration as 'typedef struct HTTP_VERSION_INFO* LPHTTP_VERSION_INFO' } HTTP_VERSION_INFO, *LPHTTP_VERSION_INFO; ^~~~~~~~~~~~~~~~~~~In file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:267:5: error: conflicting declaration 'typedef struct URL_COMPONENTSW URL_COMPONENTSW' } URL_COMPONENTSW,*LPURL_COMPONENTSW; ^~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:481:24: note: previous declaration as 'typedef struct URL_COMPONENTS URL_COMPONENTSW' typedef URL_COMPONENTS URL_COMPONENTSW; ^~~~~~~~~~~~~~~In file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:267:22: error: conflicting declaration 'typedef struct URL_COMPONENTSW* LPURL_COMPONENTSW' } URL_COMPONENTSW,*LPURL_COMPONENTSW; ^~~~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:482:26: note: previous declaration as 'typedef struct URL_COMPONENTS* LPURL_COMPONENTSW' typedef LPURL_COMPONENTS LPURL_COMPONENTSW; ^~~~~~~~~~~~~~~~~In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winnt.h:9, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:163, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/windef.h:8, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/windows.h:69, from .\http.cpp:3:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:269:3: error: conflicting declaration 'typedef struct URL_COMPONENTSA URL_COMPONENTS' __MINGW_TYPEDEF_AW(URL_COMPONENTS) ^~~~~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:480:3: note: previous declaration as 'typedef struct URL_COMPONENTS URL_COMPONENTS' } URL_COMPONENTS, *LPURL_COMPONENTS; ^~~~~~~~~~~~~~In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winnt.h:9, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:163, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/windef.h:8, from C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/windows.h:69, from .\http.cpp:3:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:270:3: error: conflicting declaration 'typedef struct URL_COMPONENTSA* LPURL_COMPONENTS' __MINGW_TYPEDEF_AW(LPURL_COMPONENTS) ^~~~~~~~~~~~~~~~~~In file included from .\http.cpp:2:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/winhttp.h:480:20: note: previous declaration as 'typedef struct URL_COMPONENTS* LPURL_COMPONENTS' } URL_COMPONENTS, *LPURL_COMPONENTS; ^~~~~~~~~~~~~~~~In file included from .\http.cpp:4:C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/wininet.h:1629:1: error: expected declaration before '}' token } ^