views:

784

answers:

2

I'm getting this runtime error R6034 when I try to execute an application in a Windows 2003 Server.

Microsoft Visual C++ Runtime Library

Runtime Error!

R6034

An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.

This server had Firebird 2.0 installed, and it works, I uninstalled it and installed Firebird 2.1, but Firebird 2.1 doesn't work at all.

When I use instclient to see which dll is installed it returns the correct result, which is the Firebird version I'm using 17910:

>instclient.exe query gds32
Installed GDS32.DLL version : 6.3.1.17910 (shared DLL count 1)

I also looked for other dll which could be lost in the system but there's none, the system is clean, but I can't get Firebird to work.

If you are wondering why do I need the gds32, it's because I use the TIBBackupService component and it uses gds32 by default (or worst, hardcoded) so it can't be changed to fbclient.dll.

Any ideas to solve this are welcome, thanks.

+1  A: 

The error is probably because you're loading a C runtime DLL from the path rather than from a SxS directory. You'll need to add a manifest to your exe which informs the OS loader about the dependency. Look at this answer which, though not directly related, points to how you can fix R6034. Note that the error refers to the C++ runtime library, not GDS32.dll. Although the other question does not mention R6034 directly, I answered that question and there was a R6034 which was the root cause.

Vinay Sajip
+2  A: 

Most probably you have opted to create the legacy gds32.dll in the system32 directory, but the necessary version of the MSVC runtime library isn't installed. Use the Microsoft Dependency Walker in either the 32 bit or 64 bit version (depending on the Firebird server version) to check which DLL isn't found. In any case, installing the MS redistributable package should help.

mghie
The error says that the C runtime is being loaded incorrectly, not that it's absent. R6034 can occur even after installing the MS redistributable package.
Vinay Sajip
I installed the Microsoft Visual C++ 2005 SP1 and it worked right away! Thanks!
Fabio Gomes