-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I read the documentation carefully and found that I needed libcurl and Google Test, then I successfully installed libcurl according to the documentation.
However, when installing GoogTest , need to install libgtest-dev via apt-get.
Google prompts me to use apt-cyg instead of apt-get and then run as follows:
When I get here, I can't go on. It seems that TestHttp can't be compiled successfully.
Later, I created a new project myself to test Http, but it still failed. The screenshot is as follows.
CMakeFiles/HTTP.dir/main.cpp.o: In function `main':
/cygdrive/c/Users/Client/Desktop/httpclient-cpp-master/HTTP/main.cpp:11: undefined reference to `CHTTPClient::InitSession(bool const&, CHTTPClient::SettingsFlag const&)'
/cygdrive/c/Users/Client/Desktop/httpclient-cpp-master/HTTP/main.cpp:11:(.text+0x44): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CHTTPClient::InitSession(bool const&, CHTTPClient::SettingsFlag const&)'
/cygdrive/c/Users/Client/Desktop/httpclient-cpp-master/HTTP/main.cpp:14: undefined reference to `CHTTPClient::DownloadFile(std::string const&, std::string const&, long&)'
/cygdrive/c/Users/Client/Desktop/httpclient-cpp-master/HTTP/main.cpp:14:(.text+0xbc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CHTTPClient::DownloadFile(std::string const&, std::string const&, long&)'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/HTTP.dir/build.make:84: HTTP.exe] Error 1
make[2]: *** [CMakeFiles/Makefile2:110: CMakeFiles/HTTP.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:122: CMakeFiles/HTTP.dir/rule] Error 2As for why I want Clion + Cygwin instead of Visual Studio, because I want cpp to compile the application, it can run on Ubuntu or Windows.
Metadata
Metadata
Assignees
Labels
No labels

