You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<cpr/cpr.h>intmain() {
cpr::Response r = cpr::Get(cpr::Url{"https://example.com/"});
}
Building the executable works with all combinations:
Debug + x86 = 🆗
Debug + x64 = 🆗
Release + x86 = 🆗
Release + x64 = 🆗
But executing does only work for the Release builds.
The Debug builds throw an error:
Exception thrown at 0x00007FFD9A0B3240 (msvcp140d.dll) in my_example.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
When the exception is thrown, Visual Studio jumps to line 58 of the file ...\packages\libcpr.1.9.8\build\native\x64\Debug\include\cpr\api.h:
template <typename... Ts> // Line 56
Response Get(Ts&&... ts) { // Line 57
Session session; // Line 58 <-- Visual Studio jumps to here when exception is thrownpriv::set_option(session, std::forward<Ts>(ts)...); // Line 59return session.Get(); // Line 60
} // Line 61
Example/How to Reproduce
Create new, empty C++ project in Visual Studio 2019.
Add a C++ file with the example code above.
Install version 1.9.8 of the libcpr NuGet package.
Choose Debug as configuration and x64 as platform.
Press the key F7 to build the executable.
Press the key F5 to start debugging.
Possible Fix
No response
Where did you get it from?
NuGet
Additional Context/Your Environment
OS: Windows 10
OS Version: Version 22H2 (Build 19045.5131)
IDE: Visual Studio Professional 2019
IDE Version: Version 16.11.42
The text was updated successfully, but these errors were encountered:
thanks, I would appreciate it very much if there would be a fix for my problem in the 1.9.x version, because I am bound to the standard C++14 due to dependencies to other libraries.
Therefore I can't use a newer cpr version which already relies on C++17 features.
Description
I'm using following simple example code:
Building the executable works with all combinations:
But executing does only work for the Release builds.
The Debug builds throw an error:
When the exception is thrown, Visual Studio jumps to line 58 of the file ...\packages\libcpr.1.9.8\build\native\x64\Debug\include\cpr\api.h:
Example/How to Reproduce
Possible Fix
No response
Where did you get it from?
NuGet
Additional Context/Your Environment
The text was updated successfully, but these errors were encountered: