Coverity support issue for Borland C++Builder - c++builder

When I compile my code using Borland C++Builder (it is necessary for me to use only the Borland compiler), bcc32.exe is able to compile the code successfully. When I build this same code with the cov-build command inside of cmd.exe, the build fails with errors like:
cannot open source file "iostream"
What is the possible reason behind this, and how do I debug it?
Here is the code

Coverity requires that you configure your compiler in the same environment that you build it in. If you fail to do so, the configuration probes will not pick up your include paths, amongst other things.

Related

How can I compile a Delphi application without using the IDE?

I need to build the components, package, and project file without using the Delphi XE7 RAD Studio IDE. Is there some way to do this using command line instead?
When you installed RAD Studio, it added a shortcut in the start menu named RAD Studio Command Prompt. Execute that shortcut. You now have a command prompt window for an environment that includes all you need to build at the comment line.
Change directory to the directory containing your .dproj files.
Execute the following command: msbuild YourProjectName.dproj.
If you have multiple projects build them all. Of course you'd want to script all this up in due course.
Control the build target (clean, make, build) and configuration (debug, release, win32, win64) using command line arguments as documented here: http://docwiki.embarcadero.com/RADStudio/en/Building_a_Project_Using_an_MSBuild_Command
For more details, start with the documentation here: http://docwiki.embarcadero.com/RADStudio/en/MSBuild_Overview

Delphi 7 Exe is not working in Non-delphi machine

Recently i got a chance to work on delphi 7. I just created a sample application which display a welcome message and that exe is working fine on Delphi machine. if i moved that exe to non-delphi machine(where delphi is not installed), it is throwing error as "The program can't start beause rtl70.bpl is missing from your computer. Try reinstalling the program to fix the problem".
if i follow the same process with Delphi 5, it is working fine.
You have built the program to rely on runtime packages. That means that each machine that needs to run the program needs to have the runtime packages available.
There are two solutions:
Distribute the runtime packages that you use alongside the executable.
Disable runtime packages and so build an executable that contains the runtime.
The runtime packages options are determined by settings specified in the project options.
Unless you have some compelling reason to use runtime packages, the second option is much simpler because it allows the executable file to stand alone, with no external dependencies.

Error Starting Delphi When Debugging Design Time Package

I've encountered a problem starting a second instance of Delphi 2010 for debugging a design time package. Under Project Options|Debugger, I use "C:\Program Files\Embarcadero\RAD Studio\7.0\bin\bds.exe" as the host app with these parameters: "-pDelphi -nocache"
I get the following error message when I run the package:
If I continue, I get the following:
Then, if I continue, I get the following:
What am I doing wrong? This has always worked before. (I have repaired and uninstalled/reinstalled Delphi 2010.)
You have a debug build of DDevExtensions installed. This version verifies its GetProcAddress calls to show missing symbols if a debugger is attached. DDevExtensions tries to hook into bcbide140.bpl (C++Builder) but doesn't find the symbols because the BPL isn't loaded (bds -pDelphi).It should skip the hooking but due to the debug build and an attached debugger it runs into the assertion.
The reason for the debug build lies in the build script of DDevExtensions: msbuild /p:Configuration=Release instead of msbuild /p:Config=Release. (So thanks for "reporting" this so I can fix the build script).

Automatic building and installing Delphi components

So, my Delphi component is functional and working, aside few details yet to cover. What I would like is to create a setup (Inno setup) that would automatically install my component into user's Delphi/C++ Builder IDE. I presume I must use delphi command line compiler, but how?
Thank you.
Unfortunately Delphi IDE does not support automated component installation at all. IMO, that is very big problem since component architecture is so important in Delphi.
You can build your package from command line (using MSBuild or DCC) but you cannot install it to IDE. To install your package you should write your own installer that builds you package, copies compiled files and updates Windows registry. Note there is no official documentation how to write such an installer, but you can take Jedi (JVCL) installer code as an example.
There are also 3rd party tools that automate component installation, for example 'lazy builder', that may be interesting to you.
It's not too hard, just messy. You need to compile a BPL for each Delphi version that you want to target and then your installer puts this BPL into a folder of your choosing (often users,public etc). This folder location is then written as a registry key under the relevant Delphi Installed Packages node. Lo when you run Delphi your components appear as if you had used the manual install packages option.

Delphi Project Needing runtime Packages, even with runtime Packages off

My Delphi7 project will not run on my clients computer if i don't have a few of the runtime packages in the path. eg rtl70.bpl
I have Build with runtime packages unticked, so shouldn't they be complied into the exe?
Edit: the Project uses Jedi Packages (TJvPlugin) and running the program with out any plugin installed works fine. As Soon as i add a Plugin, the bpl not found errors reappear. Seems like ill have to live with the extra packages.
It has been a while, but it seems like there was something where you needed to (1) check build with runtime packages, and then that enables some other editor (maybe list of packages to use), and you (2) make a change there. (3) Then do a full build, and then (4) remove the runtime packages check and do another (5) full build. It is important to do a full build each time.
From memory:
1. check the build with runtime packages
2. Remove all the run time packages from the list
3. Full build
4. Uncheck the build with run time packages
5. Full build.
Can't test, don't have D7 anymore...
Your project may use DLLs or COM objects that have been built with Delphi packages.
You also need to uncheck the "Use Dynamic RTL" on the Linker tab of the Project Options.
Caveat: I'm using C++Builder, but I believe the options are the same.
One may find this obvious, but check the size of the executable once you've compiled, if it's larger, it'll run. When we manually copy in our updates a smaller dll is a big red flag that something is wrong with the project options.

Resources