Visual studio 在VisualC中设置botan++;
出于某种原因,我使用botan连接到PKCS11硬件令牌。我是C++的新手,想用Visual Studio 2019编写代码。p> 我下载了botan源代码,并用nmake构建了源代码。生成完成后,将创建一个名为build的文件夹 我将botan目录添加到VC++目录[右键单击应用程序-->属性-->VC++目录]Visual studio 在VisualC中设置botan++;,visual-studio,visual-c++,cryptography,pkcs#11,botan,Visual Studio,Visual C++,Cryptography,Pkcs#11,Botan,出于某种原因,我使用botan连接到PKCS11硬件令牌。我是C++的新手,想用Visual Studio 2019编写代码。p> 我下载了botan源代码,并用nmake构建了源代码。生成完成后,将创建一个名为build的文件夹 我将botan目录添加到VC++目录[右键单击应用程序-->属性-->VC++目录] #include <iostream> #include <botan\botan.h> #include <botan\alg
#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);
}
#包括
#包括
#包括
#包括
#包括
#包括
int main(){
Botan::动态加载的库pkcs11模块(“C:\\pkcs11中间件\\Library.dll”);
Botan::PKCS11::FunctionListPtr func_list=nullptr;
Botan::PKCS11::LowLevel::C_GetFunctionList(PKCS11_模块和函数列表);
Botan::PKCS11::低级别p11\u低级别(功能列表);
}
这些行中有错误
- 命名空间Botan没有成员“动态加载的库” Botan::动态加载的\u库
- 后跟“::”的名称必须是类或命名空间
你是不是根据你拼写错误的botan创建了boton标签?在任何情况下都不要键入代码或错误消息:始终复制并粘贴。请用复制的错误编辑您的问题,不要拼写错误,手工输入的materialI我不熟悉Botan,但它似乎位于@James K Polk中,动态加载的库,谢谢您的评论。我编辑了问题。请在自己的测试中检查使用。与您的错误无关,但据我所知,PKCS#11头必须通过
cryptoki.h
文件包含。