我正在修改dll的代码以从ets2读取遥测(located here)
我想要做的是使用对我的服务器的POST或GET请求将数据发送到服务器,以便我可以在人们安装api时记录它。但是,我无法正常工作。
到目前为止,我在文件中所做的所有更改都包括在内:
#include <iostream>
#include <Wininet.h>
#include <tchar.h>
并将此代码添加到通常会写入文件的位置:
log_print(";%f;%f;%f", telemetry.heading, telemetry.pitch, telemetry.roll);
std::wstring url = L"http://localhost/get.php?value=value";
HINTERNET hSession = InternetOpen(L"Test", 0, NULL, NULL, 0);
HINTERNET hOpenUrl = InternetOpenUrl(hSession, url.c_str(), NULL, 0, 1, 1);
InternetCloseHandle(hOpenUrl);
InternetCloseHandle(hSession);
但是,当我添加此代码时,我收到这些错误,我不明白为什么:
Error 3 error LNK2019: unresolved external symbol __imp__InternetOpenW@20 referenced in function "void __stdcall telemetry_frame_end(unsigned int,void const * const,void * const)" (?telemetry_frame_end@@YGXIQBXQAX@Z) C:\Users\marcushann\Downloads\scs_sdk_1_2\examples\telemetry\telemetry.obj telemetry
Error 4 error LNK2019: unresolved external symbol __imp__InternetCloseHandle@4 referenced in function "void __stdcall telemetry_frame_end(unsigned int,void const * const,void * const)" (?telemetry_frame_end@@YGXIQBXQAX@Z) C:\Users\marcushann\Downloads\scs_sdk_1_2\examples\telemetry\telemetry.obj telemetry
Error 5 error LNK2019: unresolved external symbol __imp__InternetOpenUrlW@24 referenced in function "void __stdcall telemetry_frame_end(unsigned int,void const * const,void * const)" (?telemetry_frame_end@@YGXIQBXQAX@Z) C:\Users\marcushann\Downloads\scs_sdk_1_2\examples\telemetry\telemetry.obj telemetry
Error 6 error LNK1120: 3 unresolved externals C:\Users\marcushann\Downloads\scs_sdk_1_2\examples\telemetry\Debug\telemetry.dll 1 1 telemetry
请您告诉我一些有关这些错误以及如何解决这些错误的信息。
谢谢, 马库斯