本文介绍了使用VC10(sp1)编译的C ++库是否可以通过使用VC11编译的代码链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我知道VC11目前只处于测试阶段,但我要求的是:


  1. 尝试使用vc10编译的关闭源(尽可能广泛使用)链接的经验

  2. 是/否vc11将能够链接到vc10库。

我在谈论C ++案例。

解决方案

您可能需要阅读:


The question says it all.

I understand that VC11 is currently only in beta, but what I'm asking is:

  1. experience with trying to link with a closed source (widely used if possible) library compiled with vc10
  2. specifications from Microsoft saying explicitely if yes or no the vc11 will be able to link with vc10 libraries.

I'm talking about C++ case only.

解决方案

You may want to read this answer for the case of dynamic linking.

Regarding static linking, I think you can't safely link C++ libraries written with VCx with code compiled with VCy. For example, STL containers implementations change from version to version (and even within the same version, there are changes between debug and release mode, and settings like _HAS_ITERATOR_DEBUGGING, etc.).

Quoting VC++ STL maintainer:

这篇关于使用VC10(sp1)编译的C ++库是否可以通过使用VC11编译的代码链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 09:40
查看更多