© Alex van Rooijen, Bart Grootendorst, Paul Zandbergen and Harry
Broeders.
This page explains:
The component used as an example is the LED component based on the VCL.
Open the options dialog by using the Project, Options... menu item. Select the Compiler tab and press the Full debug button.
Use the Run Parameters... dialog to define C:\Program Files\THRSim11\program\gui.exe as Host Application.
Place a breakpoint. For example on the TForm1::Action2Execute
memberfunction.
Use the button to start THRSim11.
When you open the LED component and choose Toggle in the popup menu
the execution will stop at the breakpoint.
You can now use all Borland C++ debug commands. For example: use the
button to execute one line.
You can use the Run, Inspect... menu item to open the Debug
Inspector dialog. You can inspect the state of the
coc->get()
.
When you make a step over using the F8 key you can see that the value of coc->get() changed.
Use the button to resume the execution
of THRSim11.
If you compile the LED component you will get 3 warnings:
These warnings can be removed by deleting the parameter name
Sender
.
Open the options dialog by using the Project, Options... menu item. Select the Compiler tab and press the Release button.
You can build the component in 2 ways:
Open the options dialog by using the Project, Options... menu item. Select the Linker tab and check the Use dynamic RTL checkbox.
Select the Packages tab and check the Build with runtime packages checkbox.
When you build the led.dll now its size is 120 kB. But when you want to use this dll on a system where Borland C++ Builder 6.0 is not installed you need to provide the following dll's:
You can find the dependencies of led.dll by using the dependicy walker which can be found at: http://www.dependencywalker.com/
Open the options dialog by using the Project, Options... menu item. Select the Linker tab and uncheck the Use dynamic RTL checkbox.
Select the Packages tab and uncheck the Build with runtime packages checkbox.
When you build the led.dll now its size is 568 kB. But when you want to use this dll on a system where Borland C++ Builder 6.0 is not installed you don't need to provide any other files.