For some reason I came up using botan to connect to PKCS11 hardware tokens. I'm new in C++ and want to write the code in with Visual Studio 2019.
I download botan source code and built the source with nmake. After the build completed, there create a folder named build.
I add the directory of botan to VC++ Directories[right click on the application--> properties --> VC++ Directories]
#include <iostream>
#include <botan\botan.h>
#include <botan\alg_id.h>
#include <external\pkcs11t.h>
#include <external\pkcs11f.h>
#include <external\pkcs11.h>
int main() {
Botan::Dynamically_Loaded_Library pkcs11_module("C:\\pkcs11-middleware\\library.dll");
Botan::PKCS11::FunctionListPtr func_list = nullptr;
Botan::PKCS11::LowLevel::C_GetFunctionList(pkcs11_module, &func_list);
Botan::PKCS11::LowLevel p11_low_level(func_list);
}
There are errors in these lines
namespace Botan has no member "Dynamically_Loaded_Library"
Botan::Dynamically_Loaded_Library
name followed by '::' must be a class or namespace
All the lines have error, I really mixed up. Help would be appreciated