Problem in loading c run time library in Visual C++
-
I created an xll excel add-in with Visual C++ 2013 and Excel 2007/2010/2013 XLL SDK package. In the application I have to load a third party dll which depends on MSVCR90.dll for release version and MSVCR90D.dll for debug version. But I don't know how to load the MSVCR90D.dll in the project. What I tried is to create an additional manifest file or use a pragma comment instead in the code like
#pragma comment(linker, "/manifestdependency:\"name='Microsoft.VC90.DebugCRT' processorArchitecture='x86' version='9.0.30729.1' type='win32' publicKeyToken='1fc8b3b9a1e18e3b' \"")
It works in win32 console application but not in xll application. Also I wonder why in the xll application all the release version of msvcr dll including MSVCR90.dll, MSVCR100.dll and MSVCR120.dll are automatically loaded if they are installed in windows system. Since I am working in vc++ 2013, msvcr120d.dll is loaded as well. Can anyone tell me how msvcr90d.dll can be loaded as well? visual c++ 2008/2010/2013 redistributable packages are installed.
-
I created an xll excel add-in with Visual C++ 2013 and Excel 2007/2010/2013 XLL SDK package. In the application I have to load a third party dll which depends on MSVCR90.dll for release version and MSVCR90D.dll for debug version. But I don't know how to load the MSVCR90D.dll in the project. What I tried is to create an additional manifest file or use a pragma comment instead in the code like
#pragma comment(linker, "/manifestdependency:\"name='Microsoft.VC90.DebugCRT' processorArchitecture='x86' version='9.0.30729.1' type='win32' publicKeyToken='1fc8b3b9a1e18e3b' \"")
It works in win32 console application but not in xll application. Also I wonder why in the xll application all the release version of msvcr dll including MSVCR90.dll, MSVCR100.dll and MSVCR120.dll are automatically loaded if they are installed in windows system. Since I am working in vc++ 2013, msvcr120d.dll is loaded as well. Can anyone tell me how msvcr90d.dll can be loaded as well? visual c++ 2008/2010/2013 redistributable packages are installed.
There is no need to load these DLLs in your project. They must be only present on your system so that they can be found and loaded by the 3rd party DLL when your application is executed. The only problem might be getting the debug version (MSVCR90D) because it is not publicly available (not allowed to be distributed). If you have it, just copy it to your project's Debug folder where it can be found when executing the debug executable. There might be also problems when using different runtime library versions from a single application, but I have no experiences with that. The best solution would be to ask the supplier of the 3rd party DLL if he can provide a version build with VS 2013 or a version that has the runtime statically linked.
-
There is no need to load these DLLs in your project. They must be only present on your system so that they can be found and loaded by the 3rd party DLL when your application is executed. The only problem might be getting the debug version (MSVCR90D) because it is not publicly available (not allowed to be distributed). If you have it, just copy it to your project's Debug folder where it can be found when executing the debug executable. There might be also problems when using different runtime library versions from a single application, but I have no experiences with that. The best solution would be to ask the supplier of the 3rd party DLL if he can provide a version build with VS 2013 or a version that has the runtime statically linked.
When I copied the DLLs in the project debug folder, the problem still exists. When I copied the DLLs in the folder where the 3rd party DLL is, I got a R6034 Debug error "An application has made an attempt to load the C runtime library without using manifest".
-
When I copied the DLLs in the project debug folder, the problem still exists. When I copied the DLLs in the folder where the 3rd party DLL is, I got a R6034 Debug error "An application has made an attempt to load the C runtime library without using manifest".
Dropping the exact error text into google didn't help you like it helped me? The very first result was the following: [C Run-Time Error R6034](https://msdn.microsoft.com/en-us/library/ms235560(v=vs.90).aspx)