libcpr / cpr

C++ Requests: Curl for People, a spiritual port of Python Requests.
https://docs.libcpr.org/
Other
6.29k stars 903 forks source link

Linking errors when compiling #1059

Closed kubrt22 closed 2 weeks ago

kubrt22 commented 4 weeks ago

Description

I get a lot of errors when try to compile using Makefile on Windows. I tried static and dynamic libs (both from vcpkg), with both i get errors (different errors).

Makefile:

CXX = g++

CXXFLAGS = -std=c++20
INCLUDES = -IC:\Dev\vcpkg\installed\x64-windows\include
LDFLAGS = -LC:\Dev\vcpkg\installed\x64-windows\lib
LIBS = -lssl -lcrypto -lcurl -lcpr

SRC = main.cpp

OUT = main

$(OUT): $(SRC)
    $(CXX) -o $(OUT) $(SRC) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) $(LIBS)

Main.cpp

#include <iostream>
#include <cpr/cpr.h>

int main(int argc, char** argv) {
    cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
                      cpr::Authentication{"user", "pass", cpr::AuthMode::BASIC},
                      cpr::Parameters{{"anon", "true"}, {"key", "value"}});
    std::cout << r.status_code << std::endl;                  // 200
    std::cout << r.header["content-type"] << std::endl;       // application/json; charset=utf-8
    return 0;
}

Build output from dynamic libs

g++ -o main main.cpp -std=c++20 -IC:\Dev\vcpkg\installed\x64-windows\include -LC:\Dev\vcpkg\installed\x64-windows\lib -lssl -lcrypto -lcurl -lcpr
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text+0x13e): undefined reference to `cpr::Parameters::Parameters(std::initializer_list<cpr::Parameter> const&)'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text+0x29d): undefined reference to `cpr::Authentication::~Authentication()'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text+0x46d): undefined reference to `cpr::Authentication::~Authentication()'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_[_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_]+0x36): undefined reference to `cpr::Session::Session()'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_[_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_]+0x91): undefined reference to `cpr::Session::Get()'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N3cpr22CaseInsensitiveCompareESaISt4pairIKS5_S5_EEEixEOS5_[_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N3cpr22CaseInsensitiveCompareESaISt4pairIKS5_S5_EEEixEOS5_]+0x75): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x83): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x107): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x193): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x22b): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x2b7): more undefined references to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZN3cpr4priv19set_option_internalILb0ENS_3UrlEEEvRNS_7SessionEOT0_[_ZN3cpr4priv19set_option_internalILb0ENS_3UrlEEEvRNS_7SessionEOT0_]+0x27): undefined reference to `cpr::Session::SetOption(cpr::Url const&)'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS8_EPSt18_Rb_tree_node_baseRS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS8_EPSt18_Rb_tree_node_baseRS7_]+0x3b): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE24_M_get_insert_unique_posERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE24_M_get_insert_unique_posERS7_]+0x66): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE24_M_get_insert_unique_posERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE24_M_get_insert_unique_posERS7_]+0x117): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSG_PSt13_Rb_tree_nodeIS8_E[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSG_PSt13_Rb_tree_nodeIS8_E]+0x5e): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZN3cpr4priv19set_option_internalILb0ENS_14AuthenticationEEEvRNS_7SessionEOT0_[_ZN3cpr4priv19set_option_internalILb0ENS_14AuthenticationEEEvRNS_7SessionEOT0_]+0x27): undefined reference to `cpr::Session::SetOption(cpr::Authentication const&)'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZN3cpr4priv19set_option_internalILb0ENS_10ParametersEEEvRNS_7SessionEOT0_[_ZN3cpr4priv19set_option_internalILb0ENS_10ParametersEEEvRNS_7SessionEOT0_]+0x27): undefined reference to `cpr::Session::SetOption(cpr::Parameters&&)'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kubrt\AppData\Local\Temp\cccUcv84.o:main.cpp:(.text$_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3cpr21EncodedAuthenticationEED1Ev[_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3cpr21EncodedAuthenticationEED1Ev]+0x18): undefined reference to `cpr::EncodedAuthentication::~EncodedAuthentication()'
collect2.exe: error: ld returned 1 exit status
make: *** [main] Error 1

Static build:

g++ -o main main.cpp -std=c++20 -IC:\Dev\vcpkg\installed\x64-mingw-static\include -LC:\Dev\vcpkg\installed\x64-mingw-static\lib -lssl -lcrypto -lcurl -lcpr
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x1fe9): undefined reference to `curl_slist_append'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x214c): undefined reference to `curl_slist_append'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x2172): undefined reference to `curl_easy_setopt'   
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x2187): undefined reference to `curl_slist_free_all'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x2295): undefined reference to `curl_slist_append'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x233f): undefined reference to `curl_easy_setopt' 
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x25a4): undefined reference to `curl_easy_setopt' 
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x25d1): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x2672): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x26bb): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x26e2): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x34f2): undefined reference to `curl_slist_free_all'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x3a54): undefined reference to `curl_slist_append'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4345): undefined reference to `curl_easy_setopt' 
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x43f0): undefined reference to `curl_easy_setopt' 
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4406): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4470): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4486): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4a20): undefined reference to `curl_mime_free'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4a2c): undefined reference to `curl_mime_init'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4a51): undefined reference to `curl_mime_name'    
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4a61): undefined reference to `curl_mime_data'    
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4a6d): undefined reference to `curl_mime_filename'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4a8c): undefined reference to `curl_mime_addpart'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4aab): undefined reference to `curl_mime_name'   
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4ac5): undefined reference to `curl_mime_data'   
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4adf): undefined reference to `curl_easy_setopt'  
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4b27): undefined reference to `curl_mime_filedata'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4b32): undefined reference to `curl_mime_name'   
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4b53): undefined reference to `curl_mime_addpart'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4b69): undefined reference to `curl_mime_type'   
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4b78): undefined reference to `curl_mime_filename'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4b88): undefined reference to `curl_mime_type'    
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4bd0): undefined reference to `curl_easy_setopt'  
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4be4): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4bfa): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4c96): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4cbb): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x4d11): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x6213): undefined reference to `curl_easy_perform'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x6235): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x629c): undefined reference to `curl_easy_setopt' 
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x62bb): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x63a2): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x66b8): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x66cc): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x66e4): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x671e): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x6736): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x6751): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa0ec): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa103): undefined reference to `curl_slist_free_all'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa4b1): undefined reference to `curl_easy_perform'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa57c): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa590): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa5a8): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa5f2): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa60a): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa631): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa93a): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xa951): undefined reference to `curl_slist_free_all'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xaca0): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xacb4): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xad71): undefined reference to `curl_easy_perform'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xae40): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xae57): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xae6f): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xae83): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xae97): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xaee0): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xbb2f): undefined reference to `curl_version_info'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xbbcc): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xbc05): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xbc1a): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xbc32): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xbc49): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0xf9a4): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x1edd): undefined reference to `curl_easy_perform'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x2362): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x2f17): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x3140): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x3240): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x335d): undefined reference to `curl_easy_setopt'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(session.cpp.obj):session.cpp:(.text+0x3497): more undefined references to `curl_easy_setopt' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(response.cpp.obj):response.cpp:(.text+0x72c): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(response.cpp.obj):response.cpp:(.text+0x743): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(response.cpp.obj):response.cpp:(.text+0x761): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(response.cpp.obj):response.cpp:(.text+0x83a): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(response.cpp.obj):response.cpp:(.text+0x84f): undefined reference to `curl_easy_getinfo'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(response.cpp.obj):response.cpp:(.text+0x866): more undefined references to `curl_easy_getinfo' follow
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x33): undefined reference to `curl_easy_init'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x8d): undefined reference to `curl_slist_free_all'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x96): undefined reference to `curl_slist_free_all'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x9f): undefined reference to `curl_mime_free'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0xa7): undefined reference to `curl_easy_cleanup'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0xdb): undefined reference to `curl_easy_escape'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x131): undefined reference to `curl_free'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x2de): undefined reference to `curl_easy_unescape'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Dev\vcpkg\installed\x64-mingw-static\lib/libcpr.a(curlholder.cpp.obj):curlholder.cpp:(.text+0x334): undefined reference to `curl_free'
collect2.exe: error: ld returned 1 exit status
make: *** [main] Error 1

Example/How to Reproduce

  1. Install cpr using vcpkg
  2. Try to build
  3. Get errors

Possible Fix

Link something ig

Where did you get it from?

vcpkg

Additional Context/Your Environment

COM8 commented 4 weeks ago

@kubrt22 thanks for reporting. This sounds like not providing the correct lib paths. Take a look at this issue: https://github.com/libcpr/cpr/issues/1034#issuecomment-2027085481

If the error then still persists, let me know :)

kubrt22 commented 4 weeks ago

Fixed the compilation, now it doesnt give any errors: g++ -o main main.cpp -std=c++20 -IC:\Dev\vcpkg\installed\x64-mingw-static\include -LC:\Dev\vcpkg\installed\x64-mingw-static\lib -lcpr -lcurl -lzlib -lssl -lcrypto -lbcrypt -lcrypt32 -lwsock32 -lws2_32

I needed to add the -lzlib -lbcrypt -lcrypt32 -lwsock32 -lws2_32 (thanks for the link to the #1034 issue)

But now when i run the executable it will print the r.status_code as 0 instead of 200:

cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
                      cpr::Authentication{"user", "pass", cpr::AuthMode::BASIC},
                      cpr::Parameters{{"anon", "true"}, {"key", "value"}});
std::cout << r.status_code << std::endl; // 200

Happens only on this example, other sites are working just fine

COM8 commented 3 weeks ago

What does the following print:

if (s.status_code == 0) {
        std::cout << s.error.code << ": " << s.error.message << "\n";
}
kubrt22 commented 3 weeks ago

I cant print r.error.code, it gives a lot of errors. r.error.message is blank

COM8 commented 3 weeks ago

What errors do you get?

kubrt22 commented 3 weeks ago
main.cpp: In function 'int main(int, char**)':
main.cpp:11:19: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'cpr::ErrorCode')
   11 |         std::cout << r.error.code << std::endl;
      |         ~~~~~~~~~ ^~ ~~~~~~~~~~~~
      |              |               |
      |              |               cpr::ErrorCode
      |              std::ostream {aka std::basic_ostream<char>}
In file included from C:/mingw64/include/c++/13.2.0/iostream:41,
                 from main.cpp:1:
C:/mingw64/include/c++/13.2.0/ostream:110:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  110 |       operator<<(__ostream_type& (*__pf)(__ostream_type&))
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:110:36: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type& 
' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
  110 |       operator<<(__ostream_type& (*__pf)(__ostream_type&))
      |                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:119:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
  119 |       operator<<(__ios_type& (*__pf)(__ios_type&))
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:119:32: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka  
std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
  119 |       operator<<(__ios_type& (*__pf)(__ios_type&))
      |                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:129:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  129 |       operator<<(ios_base& (*__pf) (ios_base&))
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:129:30: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'std::ios_base& (*)(std::ios_base&)'
  129 |       operator<<(ios_base& (*__pf) (ios_base&))
      |                  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:168:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits 
= std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  168 |       operator<<(long __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:168:23: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'long int'
  168 |       operator<<(long __n)
      |                  ~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:172:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  172 |       operator<<(unsigned long __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:172:32: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'long unsigned int'
  172 |       operator<<(unsigned long __n)
      |                  ~~~~~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:176:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  176 |       operator<<(bool __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:176:23: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'bool'
  176 |       operator<<(bool __n)
      |                  ~~~~~^~~
In file included from C:/mingw64/include/c++/13.2.0/ostream:880:
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
   96 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:97:22: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'short int'
   97 |     operator<<(short __n)
      |                ~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:183:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  183 |       operator<<(unsigned short __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:183:33: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'short unsigned int'
  183 |       operator<<(unsigned short __n)
      |                  ~~~~~~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
  110 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:111:20: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'int'
  111 |     operator<<(int __n)
      |                ~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:194:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  194 |       operator<<(unsigned int __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:194:31: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'unsigned int'
  194 |       operator<<(unsigned int __n)
      |                  ~~~~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:203:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  203 |       operator<<(long long __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:203:28: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'long long int'
  203 |       operator<<(long long __n)
      |                  ~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:207:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = 
char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  207 |       operator<<(unsigned long long __n)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:207:37: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'long long unsigned int'
  207 |       operator<<(unsigned long long __n)
      |                  ~~~~~~~~~~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:222:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = 
std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  222 |       operator<<(double __f)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:222:25: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'double'
  222 |       operator<<(double __f)
      |                  ~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:226:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  226 |       operator<<(float __f)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:226:24: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'float'
  226 |       operator<<(float __f)
      |                  ~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:234:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  234 |       operator<<(long double __f)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:234:30: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'long double'
  234 |       operator<<(long double __f)
      |                  ~~~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:292:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
  292 |       operator<<(const void* __p)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:292:30: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'const void*'
  292 |       operator<<(const void* __p)
      |                  ~~~~~~~~~~~~^~~
C:/mingw64/include/c++/13.2.0/ostream:297:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
  297 |       operator<<(nullptr_t)
      |       ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:297:18: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'std::nullptr_t'
  297 |       operator<<(nullptr_t)
      |                  ^~~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:124:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
  124 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:125:34: note:   no known conversion for argument 1 from 'cpr::ErrorCode' to 'std::basic_ostream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
  125 |     operator<<(__streambuf_type* __sbin)
      |                ~~~~~~~~~~~~~~~~~~^~~~~~
In file included from C:/mingw64/include/c++/13.2.0/bits/basic_string.h:47,
                 from C:/mingw64/include/c++/13.2.0/string:54,
                 from C:/mingw64/include/c++/13.2.0/bits/locale_classes.h:40,
                 from C:/mingw64/include/c++/13.2.0/bits/ios_base.h:41,
                 from C:/mingw64/include/c++/13.2.0/ios:44,
                 from C:/mingw64/include/c++/13.2.0/ostream:40:
C:/mingw64/include/c++/13.2.0/string_view:760:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
  760 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/string_view:760:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/bits/basic_string.h:4020:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, 
_Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4020 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/basic_string.h:4020:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
In file included from C:/mingw64/include/c++/13.2.0/bits/memory_resource.h:38,
                 from C:/mingw64/include/c++/13.2.0/string:58:
C:/mingw64/include/c++/13.2.0/cstddef:124:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
  124 |     operator<<(byte __b, _IntegerType __shift) noexcept
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/cstddef:124:5: note:   template argument deduction/substitution failed:
main.cpp:11:14: note:   cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
   11 |         std::cout << r.error.code << std::endl;
      |         ~~~~~^~~~
In file included from C:/mingw64/include/c++/13.2.0/bits/ios_base.h:46:
C:/mingw64/include/c++/13.2.0/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
  339 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/system_error:339:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const std::error_code&'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:554:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'        
  554 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:554:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   deduced conflicting types for parameter '_CharT' ('char' and 'cpr::ErrorCode')
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:564:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
  564 |     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:564:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:570:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
  570 |     operator<<(basic_ostream<char, _Traits>& __out, char __c)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:570:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:581:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
  581 |     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:581:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'signed char'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:586:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
  586 |     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:586:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'unsigned char'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, wchar_t)' (deleted)
  595 |     operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:595:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'wchar_t'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:600:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char8_t)' (deleted)
  600 |     operator<<(basic_ostream<char, _Traits>&, char8_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:600:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'char8_t'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:605:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char16_t)' (deleted)
  605 |     operator<<(basic_ostream<char, _Traits>&, char16_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:605:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'char16_t'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:609:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char32_t)' (deleted)
  609 |     operator<<(basic_ostream<char, _Traits>&, char32_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:609:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'char32_t'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:615:5: note: candidate: 'template<class _Traits> std::basic_ostream<wchar_t, _Traits>& std::operator<<(basic_ostream<wchar_t, _Traits>&, char8_t)' (deleted)
  615 |     operator<<(basic_ostream<wchar_t, _Traits>&, char8_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:615:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'wchar_t' and 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:620:5: note: candidate: 'template<class _Traits> std::basic_ostream<wchar_t, _Traits>& std::operator<<(basic_ostream<wchar_t, _Traits>&, char16_t)' (deleted)        
  620 |     operator<<(basic_ostream<wchar_t, _Traits>&, char16_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:620:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'wchar_t' and 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:624:5: note: candidate: 'template<class _Traits> std::basic_ostream<wchar_t, _Traits>& std::operator<<(basic_ostream<wchar_t, _Traits>&, char32_t)' (deleted)        
  624 |     operator<<(basic_ostream<wchar_t, _Traits>&, char32_t) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:624:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'wchar_t' and 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:645:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 
  645 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:645:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'const _CharT*' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
  307 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/ostream.tcc:307:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const char*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:662:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
  662 |     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:662:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const char*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:675:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
  675 |     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:675:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const signed char*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:680:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
  680 |     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:680:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const unsigned char*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const wchar_t*)' (deleted)        
  689 |     operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:689:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const wchar_t*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:694:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char8_t*)' (deleted)        
  694 |     operator<<(basic_ostream<char, _Traits>&, const char8_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:694:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const char8_t*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:699:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char16_t*)' (deleted)       
  699 |     operator<<(basic_ostream<char, _Traits>&, const char16_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:699:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const char16_t*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:703:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char32_t*)' (deleted)       
  703 |     operator<<(basic_ostream<char, _Traits>&, const char32_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:703:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'const char32_t*'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/ostream:709:5: note: candidate: 'template<class _Traits> std::basic_ostream<wchar_t, _Traits>& std::operator<<(basic_ostream<wchar_t, _Traits>&, const char8_t*)' (deleted)  
  709 |     operator<<(basic_ostream<wchar_t, _Traits>&, const char8_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:709:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'wchar_t' and 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:714:5: note: candidate: 'template<class _Traits> std::basic_ostream<wchar_t, _Traits>& std::operator<<(basic_ostream<wchar_t, _Traits>&, const char16_t*)' (deleted) 
  714 |     operator<<(basic_ostream<wchar_t, _Traits>&, const char16_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:714:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'wchar_t' and 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:718:5: note: candidate: 'template<class _Traits> std::basic_ostream<wchar_t, _Traits>& std::operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*)' (deleted) 
  718 |     operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete;
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:718:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'wchar_t' and 'char'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/ostream:801:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
  801 |     operator<<(_Ostream&& __os, const _Tp& __x)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/ostream:801:5: note:   template argument deduction/substitution failed:
C:/mingw64/include/c++/13.2.0/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = cpr::ErrorCode]':
main.cpp:11:30:   required from here
C:/mingw64/include/c++/13.2.0/ostream:801:5: error: template constraint failure for 'template<class _Os, class _Tp>  requires (__derived_from_ios_base<_Os>) && requires(_Os& __os, const _Tp& __t) {__os << __t;} using std::__rvalue_stream_insertion_t = _Os&&'
C:/mingw64/include/c++/13.2.0/ostream:801:5: note: constraints not satisfied
C:/mingw64/include/c++/13.2.0/ostream: In substitution of 'template<class _Os, class _Tp>  requires (__derived_from_ios_base<_Os>) && requires(_Os& __os, const _Tp& __t) {__os << __t;} using std::__rvalue_stream_insertion_t = _Os&& [with _Os = std::basic_ostream<char>&; _Tp = cpr::ErrorCode]':
C:/mingw64/include/c++/13.2.0/ostream:801:5:   required by substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = cpr::ErrorCode]'
main.cpp:11:30:   required from here
C:/mingw64/include/c++/13.2.0/ostream:768:13:   required for the satisfaction of '__derived_from_ios_base<_Os>' [with _Os = std::basic_ostream<char, std::char_traits<char> >&]
C:/mingw64/include/c++/13.2.0/ostream:768:39: note: the expression 'is_class_v<_Tp> [with _Tp = std::basic_ostream<char, std::char_traits<char> >&]' evaluated to 'false'
  768 |     concept __derived_from_ios_base = is_class_v<_Tp>
      |                                       ^~~~~~~~~~~~~~~
In file included from C:/mingw64/include/c++/13.2.0/bits/shared_ptr_base.h:59,
                 from C:/mingw64/include/c++/13.2.0/bits/shared_ptr.h:53,
                 from C:/mingw64/include/c++/13.2.0/condition_variable:45,
                 from C:/mingw64/include/c++/13.2.0/future:41,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/api.h:6,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/cpr.h:4,
                 from main.cpp:3:
C:/mingw64/include/c++/13.2.0/bits/unique_ptr.h:1142:5: note: candidate: 'template<class _CharT, class _Traits, class _Tp, class _Dp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const unique_ptr<_Up, _Ep>&) requires requires{std::operator<<::__os << std::operator<<::__p->get();}'
 1142 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/unique_ptr.h:1142:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'const std::unique_ptr<_Up, _Ep>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
   70 |     operator<<(std::basic_ostream<_Ch, _Tr>& __os,
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/bits/shared_ptr.h:70:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'const std::__shared_ptr<_Tp, _Lp>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
In file included from C:/mingw64/include/c++/13.2.0/bits/chrono_io.h:38,
                 from C:/mingw64/include/c++/13.2.0/chrono:3330,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/cookies.h:5,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/response.h:12,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/async_wrapper.h:8,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/async.h:4,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/api.h:10:
C:/mingw64/include/c++/13.2.0/iomanip:81:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Resetiosflags)' 
   81 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:81:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'std::_Resetiosflags'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/iomanip:111:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setiosflags)'  
  111 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:111:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'std::_Setiosflags'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/iomanip:145:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setbase)'      
  145 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:145:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'std::_Setbase'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/iomanip:180:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setfill<_CharT>)'
  180 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:180:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'std::_Setfill<_CharT>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/iomanip:210:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setprecision)' 
  210 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:210:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'std::_Setprecision'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/iomanip:240:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setw)'
  240 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:240:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'std::_Setw'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
C:/mingw64/include/c++/13.2.0/iomanip:313:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Put_money<_MoneyT>)'
  313 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:313:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'std::_Put_money<_MoneyT>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
C:/mingw64/include/c++/13.2.0/iomanip:365:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Put_time<_CharT>)'
  365 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/iomanip:365:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'std::_Put_time<_CharT>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
In file included from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/threadpool.h:13,
                 from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/async.h:6:
C:/mingw64/include/c++/13.2.0/thread:97:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, thread::id)'      
   97 |     operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id)
      |     ^~~~~~~~
C:/mingw64/include/c++/13.2.0/thread:97:5: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   cannot convert 'r.cpr::Response::error.cpr::Error::code' (type 'cpr::ErrorCode') to type 'std::thread::id'
   11 |         std::cout << r.error.code << std::endl;
      |                      ~~~~~~~~^~~~
In file included from C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/response.h:13:
C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/cprtypes.h:112:15: note: candidate: 'template<class T> std::ostream& cpr::operator<<(std::ostream&, const StringHolder<T>&)'
  112 | std::ostream& operator<<(std::ostream& os, const StringHolder<T>& s) {
      |               ^~~~~~~~
C:\Dev\vcpkg\installed\x64-mingw-static\include/cpr/cprtypes.h:112:15: note:   template argument deduction/substitution failed:
main.cpp:11:30: note:   mismatched types 'const cpr::StringHolder<T>' and 'cpr::ErrorCode'
   11 |         std::cout << r.error.code << std::endl;
      |                              ^~~~
make: *** [main] Error 1
COM8 commented 3 weeks ago

The error code is an enum value. Try casting it to an unsigned e.g. std::cout << static_cast<uint>(s.error.code) << ": " << s.error.message << "\n";

Looks like your compiler can not automatically convert it.

kubrt22 commented 3 weeks ago

I get 4:, the error code is 4 and message empty

COM8 commented 2 weeks ago

4 means "internal error". I tried it on my Windows machine and I can not reproduce it. I suspect it has to do something with the TLS connection. To confirm this you can try it on an http website.

kubrt22 commented 2 weeks ago

Looks like http works fine, every page i have tried besides github for some reason works and the main issue was fixed, so i will close this and thanks for the help.