dll library with cpprestsdk compilation on windows xp

394 views Asked by At

I have dll project using cpprestsdk in visual studio 2019 (along with console application for testing purposes). On windows 7 and windows 10 original package works as expected, however I'm having hard time to compile and run on windows XP.

cpprestsdk is included in the project through NuGet, version: cpprestsdk.v141 but, its not visible for the compiler. Line #include <cpprest/http_client.h> throws an error.

Changes i've made:

  • platform toolset set to Visual Studio 2017 - Windows XP (v141_xp)
  • preprocessor definitions updated to include CPPREST_TARGET_XP
  • statically included cpprest141_2_10.dll
  • statically linked cpprest141_2_10.lib
  • console application setting ConformanceMode set to false

Now the app is compiling, but it's not working properly on windows 10 (crashes on sending request). and it's not starting on windows XP (dll entry point not found)

Any1 have any idea what's going on?

@edit: after adding to program folder missing dlls:

  • api-ms-win-core-crt-l1-1-0.dll
  • api-ms-win-core-crt-l2-1-0.dll
  • httpapi.dll

it came to ntdll.dll

Entry Point Not Found error screenshot

The procedure entry point WinSqmAddToStreamEx could not be located in the dynamic link library ntdll.dll

1

There are 1 answers

0
Ken On

all you need to do is downgrade your Visual studio to 2013 and donwload the version of cpprest SDK like 2.9.1 which support the VS 2013 (msvc 120) as well, hope it helps