I would like to ask you how to debug a DLL library which is a C++ Builder project and which I use in other C++ Builder VCL project.
Is there same manual or tutorial for that? Is this possible?
I need that for C++ Builder 10.3, x86, classic `old` Borland compiler.
This is possible (and works well if the dll is written using the "classic" compiler).
You compile your dll in "debug" compilation.
You need an external program that calls your dll. (this may well be another exe project in the same project group).
In the IDE - use the menu Run | Parameters and enter the full path to this external exe program into the "host application" edit box.
Now when you click on the Run button, with your dll as the active project, it will compile and link to create the dll (if necessary) and then launch the "host application". When this host application calls functions in your dll the IDE will stop at any break points and all works as normal debugging.
Hope this helps, regards, Roger
Hi Roger,Thank you very much for this advice. It works as you write. Do you know if I can use the same approach for the `new` clang compiler (brcc32c)? We would like to migrate all our project to new clang compiler.Best regard, Jaroslav
The theory is that using the clang compiler should all work as per the "classic" compiler. There are still some limitations with the clang compiler in terms of debugging operation. This is still an area Embarcadero are focusing on improving as it is one of the main reasons that C++ users still continue to use the "classic" compiler.