在 Visual Studio 2013 下为/MD 版本重建 Crypto++ 5.6.2 [英] Rebuild Crypto++ 5.6.2 for /MD release under Visual Studio 2013

查看:106
本文介绍了在 Visual Studio 2013 下为/MD 版本重建 Crypto++ 5.6.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过 MSVC 2013 重建 Crypto++,所以当我使用该库时,能够使用/MD 或/MDd,而不是/MT 或/MTd 构建我的项目,因为我使用的是带有 MSVC2013 32 位的 QT 5.5.1编译器,看来如果我想制作 GUI 界面 - 它正在使用/MD 或/MDd!在这篇文章中Static Versus Dynamic Linking 提到了重建(不是构建)的必要性以及如何从我的其他问题 我做到了,但它仅适用于调试模式.对于 Release 模式,错误从 117 转到 53,但再次出现相同的旧错误:

I want to rebuild Crypto++ via MSVC 2013 so when I am using the library to be able to build my project with /MD or /MDd, NOT /MT or /MTd, because I am using QT 5.5.1 with MSVC2013 32bit compiler and it seems if I want to make GUI interface - it is using /MD or /MDd! In this article in section Static Versus Dynamic Linking is mentioned the necessity for rebuilding (not building) and how you can see from my other question I did it, but it is only working for debug mode. For Release mode the errors from 117 go to 53, but again the same old error occures:

cryptlib.lib(cryptlib.obj):-1: 错误: LNK2038: 检测到不匹配'RuntimeLibrary':值 'MT_StaticRelease' 与值不匹配main.obj 中的MD_DynamicRelease"

cryptlib.lib(cryptlib.obj):-1: error: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in main.obj

我正在做我提到的这里

推荐答案

我想通过 MSVC 2013 重建 Crypto++...

I want to rebuild Crypto++ via MSVC 2013...

好的,所以这里的痛点是 Microsoft 在 2010 年对 MSBuild 进行了更改.更糟糕的是,VCUpgrade 在升级项目方面做得很差.

OK, so the pain points here are the Microsoft changes to MSBuild at 2010. To make matters worse, VCUpgrade does a rather poor job of up-converting projects.

为了帮助用户完成升级过程,Crypto++ 提供了一个名为 vs2010.zip 的文件.该存档包含用于 Visual Studio 2010 及更高版本的预转换解决方案文件、项目文件和筛选器.这些文件于 2015 年 10 月与 5.6.3 候选版本一起发布.

To help users with the upgrade process, Crypto++ provides a file called vs2010.zip. The archive contains the pre-converted solution file, project files and filters for Visual Studio 2010 and above. The files were released in October 2015 with a 5.6.3 Release Candidate.

升级后的解决方案文件大多成功.他们从 IDE 正确构建了 24 个配置中的 20 个.其中 4 个在第一次尝试时失败;但该过程在第二次尝试时恢复并构建所有 24 个.我们知道这是一个依赖/排序问题,但我们不知道如何解决它.How to control order of Batch Build → Build All 上有一个关于 Stack Overflow 的悬而未决的问题.

The upgraded solution files are mostly successful. They build 20 of 24 configurations properly from the IDE. 4 of them fail on the first attempt; but the process recovers on the second attempt and builds all 24. We know its a dependency/ordering issue, but we don't know how to solve it. There's an open question on Stack Overflow at How to control order of Batch Build → Build All.

现在有一个关于 Visual Studio 2010 和 VCUpgrade 的页面.请参阅 Crypto++ wiki 上的 Visual Studio.

There is now a page on the subject of Visual Studio 2010 and VCUpgrade. See Visual Studio on the Crypto++ wiki.

在本文中...

我写了那篇文章 几年前.你走在正确的轨道上.

I wrote that article years ago. You are on the right track.

我做到了,但它仅适用于调试模式.对于 Release 模式,错误从 117 转到 53,但再次出现相同的旧错误:

I did it, but it is only working for debug mode. For Release mode the errors from 117 go to 53, but again the same old error occures:

cryptlib.lib(cryptlib.obj):-1: error: LNK2038: mismatch detected for 'RuntimeLibrary':
value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in main.obj

我们为您添加了一个 ZIP 文件.ZIP 是使用动态运行时链接(/MD/MDd)的预转换 Visual Studio 2010 解决方案和项目文件.(这不仅仅是你一个人,因为多年来很多人都问过这个问题).

We added a ZIP file for you. The ZIP is a pre-converted Visual Studio 2010 solution and project files that utilizes dynamic runtime linking (/MD and /MDd). (Its not really just you since a lot of folks have asked about it over the years).

解决您的问题的方法是:

The solution to your problems are:

  1. 从 Crypto++ wiki 下载 vs2010-dynamic.zip立>
  2. 解压现有的 Crypto++ 分发文件.

这篇关于在 Visual Studio 2013 下为/MD 版本重建 Crypto++ 5.6.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆