This blog post contains both a fix for compiling kbmMemTable in pure C++Builder personality in newer C++Builder versions (10.x.x – tested with 10.3.3), and a showstopper bug in the IDE when opening it with C++Builder only personality, and compiling kbmMemTable Runtime package in C++Builder 10.3.3 (no Delphi personality) for Win64.
Because of the growing complexity of compiling packages in C++Builder, I have only occationally updated the C++Builder only projects for kbmMW and kbmMemTable, and instead realied on the Delphi personality, which I always recommend people to also have when using C++Builder, simply because C++Builder is a “bastard” compared to Delphi which is the true 1.st citizen compiler in the IDE. It just simplifies many things, also when being a C++ only developer to have the Delphi personality included.
This has worked out seemingly quite well for several years, either indicating that most that do code using C++Builder, have bought RAD studio including the Delphi personality, or indicating that only very few are actually using C++Builder with kbmMemTable.
However recently a kbmMemTable user contacted me. He had difficulties getting kbmMemTable compiled and installed in his C++Builder only environment.
After some mails forth and back, it seems that we have found a solution for the issues he encounters during compilation. It is those solutions I will describe in this blogpost.
The kbmMemTable project issue
The kbmMemTable installer comes with a C++Builder Seattle project file. To use it in C++Builder 10.3.3 (and probably 10.3.x) do the following:
- Open the runtime package in the IDE and save it as kbmMemRunC103Std.
- Open the designtime package in the IDE and save it as kbmMemDesC103Std.
- Close the package files.
- Open kbmMemDesC103Std.cbproj in notepad.exe or similar editor.
- Locate and delete the line <OutputExt>.dll</OutputExt>
- Save the file and close the editor.
- Open kbmMemRunC103Std in the IDE… Build.
- Open kbmMemDesC103Std in the IDE… Build….Install
Compiling kbmMemTable runtime package for Win64
The C++Builder IDE 64 bit compilation showstopper
- Open the kbmMemRunC103Std package in the IDE. Add the Win64 target.
Usually you would then just build the package and be happy. Unfortunately doing that, crashes the IDE without warning after a short while. Debugging into it, it seems to be at a place where the IDE is attempting to collect the number of lines compiled. It actually ends up having generated all headerfiles, and object files, but not the final .a (archive) file.
The workaround is to compile from the command line.
- Start RAD Studio Command Prompt:
- In the Cmd.exe like window, type:
msbuild kbmMemRunC103Std.cbproj /t:Build /p:config=Debug /p:platform=Win64
Now everything will compile correctly and the .a file will be available for later linking when you compile your 64 bit application.
19,727 total views, 2 views today