如何安装 Crypto++在 Visual Studio 2010 中?

发布于 2024-11-19 06:51:55 字数 159 浏览 8 评论 0原文

我下载了 http://www.cryptopp.com/#download 5.6.1 并且没有任何线索此时要做的事情。我是个菜鸟,需要良好的指导。谢谢。

I downloaded http://www.cryptopp.com/#download 5.6.1 and have no clue that to do at this point. I am a total noob and need good instructions. thanks.

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

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

发布评论

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

评论(4

腹黑女流氓 2024-11-26 06:51:55

直接来自自述文件(可以在此处找到 Crypto++ Svn Trunk):

* MSVC 特定信息*

在 Windows 上,Crypto++ 可以编译成 3 种形式: 静态库包括所有算法、仅包含 FIPS 批准算法的 DLL 以及仅包含 DLL 中未包含的算法的静态库。 (FIPS 批准意味着根据 FIPS 140-2 标准批准。)DLL 可以单独使用,也可以与静态库的第二种形式一起使用。其中包括用于构建所有三种表单的 MSVC 项目文件,还包括使用这三种表单的示例应用程序。

要使用 MSVC 编译 Crypto++,请打开“cryptest.dsw”(对于 MSVC 6 和 MSVC .NET 2003)或“cryptest.sln”(对于 MSVC 2005 - 2010)工作区文件并构建以下一个或多个项目:

  • cryptopp -这将构建 DLL。请注意,如果您希望使用 Crypto++ 作为 FIPS 验证模块,则必须使用经过 FIPS 验证过程的预构建 DLL,而不是构建您自己的 DLL。
  • dlltest - 这构建了一个仅使用 DLL 的示例应用程序。
  • cryptest 非 DLL 导入配置 - 这会构建完整的静态库以及完整的测试驱动程序。
  • cryptest DLL 导入配置 - 这会构建一个仅包含 DLL 中没有的算法的静态库,以及使用 DLL 和静态库的完整测试驱动程序。

要在应用程序中使用 Crypto++ DLL,请在包含任何其他 Crypto++ 头文件之前 #include“dll.h”,并将 DLL 放置在与 .exe 文件相同的目录中。 dll.h 包含 #pragma comment(lib, "cryptopp") 行,因此您不必在项目设置中显式列出导入库。

要使用 Crypto++ 的静态库形式,请将“cryptlib”项目作为应用程序项目的依赖项,或将其指定为要在项目设置中链接的附加库。无论哪种情况,您都应该检查编译器选项,以确保库和您的应用程序使用相同的 C++
运行时库和调用约定。

如果您有任何问题,请随时提问,我将用我的回复更新答案。

Directly from the readme (Which can be found here Crypto++ Svn Trunk):

* MSVC-Specific Information *

On Windows, Crypto++ can be compiled into 3 forms: a static library including all algorithms, a DLL with only FIPS Approved algorithms, and a static library with only algorithms not in the DLL. (FIPS Approved means Approved according to the FIPS 140-2 standard.) The DLL may be used by itself, or it may be used together with the second form of the static library. MSVC project files are included to build all three forms, and sample applications using each of the three forms are also included.

To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET 2003) or "cryptest.sln" (for MSVC 2005 - 2010) workspace file and build one or more of the following projects:

  • cryptopp - This builds the DLL. Please note that if you wish to use Crypto++ as a FIPS validated module, you must use a pre-built DLL that has undergone the FIPS validation process instead of building your own.
  • dlltest - This builds a sample application that only uses the DLL.
  • cryptest Non-DLL-Import Configuration - This builds the full static library along with a full test driver.
  • cryptest DLL-Import Configuration - This builds a static library containing only algorithms not in the DLL, along with a full test driver that uses both the DLL and the static library.

To use the Crypto++ DLL in your application, #include "dll.h" before including any other Crypto++ header files, and place the DLL in the same directory as your .exe file. dll.h includes the line #pragma comment(lib, "cryptopp") so you don't have to explicitly list the import library in your project settings.

To use a static library form of Crypto++, make the "cryptlib" project a dependency of your application project, or specify it as an additional library to link with in your project settings. In either case you should check the compiler options to make sure that the library and your application are using the same C++
run-time libraries and calling conventions.

If you have any questions feel free to ask and i'll update the anwser with my responses.

何其悲哀 2024-11-26 06:51:55

我下载了 http://www.cryptopp.com/#download 5.6.1 并拥有不知道此时该怎么办...

答案,但该项目已经发布了一些新文件来帮助人们使用 Visual Studio 2010 及更高版本。

该项目必须发布更新的文件,因为 VCUpgrade(随 Visual Studio 2010 提供)在该特定项目中的表现相当糟糕。几年来,它一直是问题的根源,甚至视力受损的用户也对此发表了评论。这些问题在 VS2012、VS2013 和 VS2015 中都没有得到解决,因此我们不认为微软有任何修复这些问题的意图。

要使用更新的文件,请从网站下载最新的 Crypto++ 版本。然后,访问 Crypto++ wiki 并从页面获取 vs2010.zip Visual Studio。将 vs2010.zip 解压到 Crypto++ 文件上。最后双击名为 cryptest.sln 的文件,让 Visual Studio 打开解决方案文件。

Crypto++ wiki 页面还提供了为 VS2005 和 VS2010 提供动态运行时链接的项目文件。

I downloaded http://www.cryptopp.com/#download 5.6.1 and have no clue what to do at this point...

This is a very late answer, but the project has released some new files to help folks use Visual Studio 2010 and above.

The project had to release the updated files because VCUpgrade (provided with Visual Studio 2010) does a fairly poor job with this particular project. It has been a source of problems for a few years, and even visually impaired users were commenting about it. The problems were not fixed in VS2012, VS2013 and VS2015, so we don't believe Microsoft has any intentions of fixing the problems.

To use the updated files, download the latest Crypto++ release from the website. Then, visit the Crypto++ wiki and fetch vs2010.zip from the page Visual Studio. Unzip vs2010.zip over the Crypto++ files. Finally double-click the file called cryptest.sln to have Visual Studio open the solution file.

The Crypto++ wiki page also offers project files that provide dynamic runtime linking for both VS2005 and VS2010.

白龙吟 2024-11-26 06:51:55

如果将 cryptest.sln 从 VS2005 转换为 VS2010,则会遇到问题。当您编译源代码时,编译器将显示错误:

c1xx : fatal error C1027: Inconfluence Values for /Ym Between Creations and use of Precompiled header

您可以通过以下方式解决此问题:

  1. 转到项目属性 --> >配置属性--> C/C++ -->预编译头文件

  2. 将其更改为“不使用预编译头”

If you convert cryptest.sln from VS2005 to VS2010, you will meet a problem. When you compile source code, the compiler will show an error:

c1xx : fatal error C1027: Inconsistent values for /Ym between creation and use of precompiled header

You can resolve this problem by:

  1. Going to Project Properties --> Configuration Properties --> C/C++ --> Precompiled Headers

  2. Changing it to "Not Using Precompiled Headers"

甜尕妞 2024-11-26 06:51:55

在将其与任何内容一起使用之前,您需要先编译该库。你不能只安装它。这是他们的 wiki 中关于编译库的页面: http://www.cryptopp.com/wiki/Compiling

You'll need to compile the library before using it with anything. You can't just install it. Here is a page from their wiki about compiling the library: http://www.cryptopp.com/wiki/Compiling

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