编译 rsa 库时出现 LNK 错误

发布于 2024-12-21 17:31:55 字数 507 浏览 0 评论 0原文

为什么我在尝试编译此 rsa 库时收到此 LNK 错误: http://www.efgh.com/software/rsa.txthttp://www.efgh.com/software/rsa.htm

mpuint.obj : error LNK2019: unresolved external symbol "void __cdecl numeric_overflow(void)" (?numeric_overflow@@YAXXZ) referenced in function "public: void __thiscall mpuint::operator=(class mpuint const &)" (??4mpuint@@QAEXABV0@@Z)

why am i getting this LNK error when trying to compile this rsa library:
http://www.efgh.com/software/rsa.txt
from
http://www.efgh.com/software/rsa.htm

mpuint.obj : error LNK2019: unresolved external symbol "void __cdecl numeric_overflow(void)" (?numeric_overflow@@YAXXZ) referenced in function "public: void __thiscall mpuint::operator=(class mpuint const &)" (??4mpuint@@QAEXABV0@@Z)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

放低过去 2024-12-28 17:31:55

请在 MPUINT.CPP 中添加新函数:

void numeric_overflow() {
    printf("Numeric overflow!");
}

问候,

Trung,

Please add new function in MPUINT.CPP:

void numeric_overflow() {
    printf("Numeric overflow!");
}

Regards,

Trung,

青芜 2024-12-28 17:31:55

因为您没有在链接器设置中指定库文件。库文件包含您在代码中使用的 API 的实际定义。在您的示例中,您包含了一个头文件,该文件以某种方式或在某处声明了具有以下签名的函数:

void __cdecl numeric_overflow(void)

但您没有包含定义该函数的库。库在项目设置->中指定配置属性->链接器->输入-> Visual Studio 中的附加依赖项字段。

然后在该字段中指定与您使用的函数相对应的库文件。

Because you didn't specify a library file in your linker settings. A library file contains the actual definitions of the API's you are using in your code. In your example, you included a header file that somehow or somewhere declared a function with the following signature:

void __cdecl numeric_overflow(void)

But you didn't include the library that defines the function. The library is specified in the project settings -> Configuration Properties -> Linker -> Input -> Additional Dependencies field in visual studio.

In that field you then specify the library file that corresponds to the function you used.

终陌 2024-12-28 17:31:55

请注意:这个 RSA 库的性能不太好。
您可以尝试其他库(开源):

  1. xInt(C++,易于理解,速度快,但该库是Boost库的一部分): http://www.oakcircle.com/xint_docs/
  2. BigDigits(C,轻量级,非常快):http://www.di-mgt.com.au/bigdigits.html
  3. Crypto++ ( C++,重,实现大多数加密算法): http://www.cryptopp.com/

尊敬的,

Trung,

Please note: this RSA library performance is not so well.
You can try other libraries (open source):

  1. xInt (C++, easy to understand, fast, but this library is a part of Boost library): http://www.oakcircle.com/xint_docs/
  2. BigDigits (C, lightweight, very fast): http://www.di-mgt.com.au/bigdigits.html
  3. Crypto++ (C++, heavy, implement most crypto algorithms): http://www.cryptopp.com/

Regard,

Trung,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文