Crypto++ on Windows XP

Viewed 179

I am trying to build Crypto++ and target Windows XP. Reading this, I made these changes before building the library:

  • Platform Toolset = Visual Studio 2017 - Windows XP (v141_xp) Platform Toolset = Visual Studio 2017 - Windows XP (v141_xp)

  • Predefine macros WINVER=0x0501 and _WIN32_WINNT=0x0501 WINVER=0x0501

Then I compiled some code (with the same changes as before for XP compatibility):

#include <iostream>
#include <stdio.h>

#include <cryptopp/cryptlib.h>
#include <cryptopp/blake2.h>


int main() {
    using namespace CryptoPP;

    BLAKE2b hash;
    std::string password = "hunter1";
    hash.Update((const byte*)password.data(), password.size());

    std::string digest;
    digest.resize(hash.DigestSize());
    
    hash.Final((byte*)&digest[0]);

    printf("Message: %s\n", password.c_str());
    puts("Digest:");

    for (char ch : digest)
        printf("%02hhX", ch);

    putchar('\n');
}

This works fine on Windows 10, but when I copy the Release directoty to Windows XP for testing, I get this error:

enter image description here]

So, what am I doing wrong, and how can I use this library on Windows XP, if at all?

0 Answers
Related