Can BCB6 and BDS 2006 be installed on the same machine?

Abstract: Can BCB6 and BDS 2006 be installed on the same machine?

  • Product Name: C++ Builder
  • Product Version: 6 & 2006
  • Product Component: N/A
  • Platform/OS Version: Windows

Description:

Can BCB6 and BDS 2006 be installed on the same machine?


Answer/Solution:

BCB6 users often want to know if BDS 2006 and BCB6 can be installed and coexist peacefully on the same machine. The answer is yes, but with a few minor caveats to be aware of.

First, BDE users should be aware that installing BDS 2006 will replace BCB6's "BCDEMOS" alias with one called "DBDEMOS." The good news is that BCDEMOS and DBDEMOS contain the same tables. Of course, any projects that refer to BCDEMOS will have to be updated to point to DBDEMOS instead. This is unlikely to be much of an issue since users almost never use this sample BDE database except in unimportant test projects.

The more important caveat is for customers who use CodeGuard. The CodeGuard DLL, cg32.dll, has the same name in BCB6 and BDS 2006. Hence, at runtime, applications built using one version of C++Builder may pick up cg32.dll from the other version.

Problems arise when a BCB6 application tries to use cg32.dll from BDS 2006. It will fail with "The application failed to initialize properly(0xc0000005); Click OK to terminate." This usually happens when the BDS 2006 \Bin directory comes first on the system path.

The following three workarounds seem to eliminate the error. I have listed them in order of personal preference:

(1)
Place a copy of cg32.dll from the correct product in the executable's working directory. This will ensure that the executable finds the correct version of cg32.dll and only requires one copy and paste operation upon creation of a new project.

(2)
Modify the system path so that the BCB6 \Bin directory comes before the BDS 2006 \Bin directory. My testing suggests that the problem only occurs when a BCB6 executable tries to use cg32.dll from BDS 2006. The converse, when a BDS 2006 executable uses cg32.dll from BCB6, does not seem to result in the same problem.

(3)
Create two batch files ? one that modifies the system path so that BCB6's \Bin directory comes first, and another that modifies it so that BDS 2006's \Bin directory comes first. Run the appropriate batch file before running the executable. This has the same benefits as the first workaround above, but I find it to be the most cumbersome.

BCB6 and BDS 2006 use their own unique paths at design time, so we can be certain that the correct version of CodeGuard is being linked in. It's just a matter of making sure the executable finds the correct version first on the search path at runtime.


Author: Rajini Billahalli