[英]How can I ensure that auth.dll can be loaded?
I'm trying to use crypto++ in c++ clr class library .我正在尝试在c++ clr class library 中使用 crypto++。
The problem is that I get an error as I run the app, but it builds successfully.问题是我在运行应用程序时遇到错误,但它构建成功。
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'auth.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
at ConsoleApp52.Program.Main(String[] args)
This error only occurs when I include anything from crypto++仅当我包含来自 crypto++ 的任何内容时才会发生此错误
#include "dll.h"
#include "sha.h"
#include "filters.h"
#include "hex.h"
If I remove the following lines, it works.如果我删除以下几行,它会起作用。
I've tried copying the cryptopp.dll to the bin/x64/Debug and bin/Debug, but it did not resolve the issue.我已经尝试将 cryptopp.dll 复制到 bin/x64/Debug 和 bin/Debug,但它没有解决问题。
What else do I need to include?我还需要包括什么? Am I Missing something?
我错过了什么吗?
Error code 0x8007045A
most often means 32/64 bit DLL incompatibility.错误代码
0x8007045A
通常表示 32/64 位 DLL 不兼容。
If you're using native DLLs with managed code, make sure to use 64-bit versions on a 64-bit OS.如果您使用带有托管代码的本机 DLL,请确保在 64 位操作系统上使用 64 位版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.