Debugging Delphi programs with GDB - delphi

My goal is to use VS Code for developing Delphi application and I can already build Delphi projects (.dproj) and group projects (.groupproj) with debug information. But I use RAD Studio\9.0 for compilation and it puts symbols inside .rsm files and I am not sure, if GDB can debug executable using those files, because by default it tells me that "no debugging symbols found" even when it sees the .rsm files.
Is there a way to make GDB use the .rsm files or a way in MSBuild to let Delphi create some symbol format usable by GDB for debugging?

Related

'Cannot open program database' problem in Windows docker container

I use ninja as the build tool of cmake, ninja build parallelly. When build in the physical machine, it compiles without any problem, but in a Windows docker container, it reports:
fatal error C1041: cannot open program database 'blabla.pdb'; if multiple CL.EXE write to
the same .PDB file, please use /FS
The compiler is MSVC 2015, but the /FS seems a 2012 or 2013 option, after add /FS to the CXX flags:
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe"
is not able to compile a simple test program.
It compiles without problem if I just use one core.
I have searched the web for a long time, but no useful information found.

Coverity support issue for Borland 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.

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.

RAVE Report Error "dbrtl160.bpl missing"

When I run RAVE Reports Designer from an IDE (Delphi XE2) I get this error:
"The program can not start because dbrtl160.bpl missing from your computer. Try reinstalling the program to fix this problem"
However, in the Delphi XE2 folder the file dbrtl160.bpl exists.
What is going wrong here?
The file needs to be either in the same folder as your application, or a folder on the system PATH. The IDE uses it from it's own folder, but when your app (or in this case, RAVE) runs it's not in the IDE folder. The IDE usually adds the necessary RAVE folder to the PATH during installation, but if you've installed a RAVE update it could have been deleted or changed, or something else you've installed damaged thte PATH statement.
Delphi packages are just special DLLs, and they're loaded by LoadLibrary when your app starts. The rules for finding them are those that LoadLibrary uses, as well. The search order is specified in the Remarks section of the LoadLibrary documentation on MSDN.
if you using x64 windows, you must copy rave files to C:\Program Files\Embarcadero\RAD Studio\8.0\Rave...

Resources