C Run-Time Error R6034
Error Message
An application has made an attempt to load the C runtime library without using a manifest. This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest. For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.Applications must use a manifest to load the C runtime library. For more information, see Visual C++ Libraries as Shared Side-by-Side Assemblies and Manifest Generation in Visual Studio.
In release builds, the diagnostic message reads: "An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information."
To correct this error
-
Rebuild your application with a manifest. Building an application with Visual Studio automatically puts the manifest into the resulting EXE or DLL file. If you are building at the command line, use the mt.exe tool to add the manifest as a resource. Use resource ID 1 if building an EXE, 2 if building a DLL. For more information, see How to: Embed a Manifest Inside a C/C++ Application.
(1) The problem: A.EXE depends on {B.DLL, MSVCR80D.DLL}; B.DLL depends on {MSVCR80.DLL}; A.EXE runs into exception R6034, as the title.
(2) The fix: replace B.DLL with B_DEBUG.DLL, which provides the same API as B.DLL but depends on {MSVCR80D.DLL}, and get A1.EXE. A1.EXE runs fine.
(3) reasoning and conclusions:
(3.1)Check the embeded manifest of B_DEBUG.DLL:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
(3.2) Check the embeded manifest of B.DLL:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
(3.3) Hypothesis01: Microsoft.VC80.DebugCRT and Microsoft.VC80.CRT share the common publicKeyToken "1fc8b3b9a1e18e3b", so the "assembly" loading mechanism get into a mess.
(3.4) Hypothesis02: If compile and link B.DLL with VC6.0, then no "assembly" conception nor "assembly loading mechanism", nor the R6034 exception.
(3.5) Conclusion01: The statement "An application has made an attempt to load the C runtime library without using a manifest" miss the point and some enhancement of document is necessary.
- 11/10/2011
- wxq_from_china
- 12/1/2010
- kenbrody
- 11/30/2010
- bks5253
- 7/9/2009
- S. Kostrov
- 9/4/2010
- don the great
- 12/22/2009
- thanchu
- 9/4/2010
- don the great
In my case of a R6034 I just had to remove the external manifest and it started up OK.
- 9/28/2009
- swave
- 7/2/2009
- HYPACK
- 12/3/2008
- Kurien Mathew