3

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

  • Welcome to Stack Overflow! Are you sure the DLLs themselves were built for XP? Perhaps there is a different DLL for that platform and toolset? Could you build the DLLs yourself to make sure everything matches? – metal Sep 29 '20 at 12:09
  • @Michał Mach - If you will add a detailed description of the error to the post it can help to understand the picture clearer. – Jackdaw Sep 29 '20 at 15:03
  • 1st of all *XP* is no longer supported by *MS*. Also is the pkg supposed to build for *XP*? – CristiFati Oct 01 '20 at 20:58
  • Yes, I know, but the dll it meant for XP POS Embedded (EOL 2019). Sadly there is no way around, it has to work for XP. The cpprestsdk package should build for XP, I've tried to build from v2.9.1 tag https://github.com/microsoft/cpprestsdk/tree/v2.9.1/Release/src/build/vs14.xp But still no luck (XP still screams about missing dlls / missing entry points in dlls) – codewarriorr Oct 03 '20 at 07:25

1 Answers1

0

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

Ken
  • 47
  • 6