Posted by Microsoft on 8/26/2008 at 1:35 PM
The Visual C++ team has triaged the issue you reported. The issue has been resolved during triage with the following message:
When you compile you program in debug, the application manifest embedded in main.exe is this one:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
As you can see, you depends on both Microsoft.VC90.DebugCRT and on Microsoft.VC80.CRT. The double dependency is not bad "per se". It's probably caused by a static library depending on the 80 Retail CRT.
Indeed, if you do "dumpbin /directives ssleay32.lib" you will find that they depend on the 80 Retail CRT.
But the problem is that you also have a dependency on the 90 Retail CRT (as you noticed with depends.exe), which is not expressed in the manifest.
Who's causing this dependency? Very likely, one of the static libraries you're using.
If you turn on the /verbose switch during the linking phase, you'll see in the output window that:
1> Referenced in OLDNAMES.lib(fileno.obi)
1> Loaded msvcrt.lib(MSVCR90.dll)
oldnames.lib brings in the dependency on msvcr90.dll.
There are two way of fixing this:
1) remove the need for oldnames.lib: oldnames.lib is brought in by fileno, which is referenced in libeay32.lib(bss_file.obj):
1> Searching c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
1> Found __imp__fileno
1> Referenced in libeay32.lib(bss_file.obj)
1> Loaded OLDNAMES.lib(fileno.obi)
2) manually add a depedency on msvcr90.dll assembly with an additional application manifest, which you have to write (you can't use Microsoft.VC90.DebugCRT.manifest, because it's an assembly manifest, not an application manifest)
3) manually add a depedency on msvcr90.dll assembly with a linker directive like this one (added to main.cpp, for example):
// add a dependency on the retail crt even in debug
#ifdef _M_IX86
#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='x86' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif
#endif /* _M_IX86 */
#ifdef _M_AMD64
#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='amd64' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif
#endif /* _M_AMD64 */
#ifdef _M_IA64
#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='ia64' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif
#endif /* _M_IA64 */
the code was adapted from crtdefs.h.
HTH. More help on this can be found on the forum or with product support.
For the next release of Visual Studio, we're planning to greatly simplify this complex scenarios.
For further information, you may want to consult one of these resources:
1. Visual C++ triage guidelines:
http://blogs.msdn.com/vcblog/articles/621116.aspx
2. MSDN forums:
http://forums.microsoft.com/msdn/default.aspx
Thank you for taking time to send us feedback,
The Visual C++ Team
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/) | Powered by Discuz! X2 |