2010年4月27日 星期二

Visual Studio 2008 Link Problem

http://msdn.microsoft.com/en-us/library/cc664727.aspx

在Visual Stdio 2008 中,要使用 #define _BIND_TO_CURRENT_VCLIBS_VERSION 1;
才會對 SP1 的Library binding 。不然的話,預設的連結方式為連結到 release version。

To show what version of libraries that lib file needs, type:
dumpbin /directives .lib
The output might contain something like:




Linker Directives

-----------------

/manifestdependency:"type='win32'

name='Microsoft.VC90.CRT'

version='9.0.21022.8'

processorArchitecture='x86'

publicKeyToken='1fc8b3b9a1e18e3b'"

/DEFAULTLIB:"MSVCRT"

/DEFAULTLIB:"OLDNAMES"



related info:
http://www.nuonsoft.com/blog/2008/10/29/binding-to-the-most-recent-visual-studio-libraries/
http://blogs.msdn.com/vcblog/archive/2008/08/12/bugs-fixed-in-mfc-in-visual-studio-2008-sp1.aspx

沒有留言: