Linking

In most workflows, a Testwell CTC++ runtime needs to be linked to the test executable. This is handled automatically by ctc, but can also be performed manually in a separate step.

Like compiler calls, ctc also handles calls to the linker (in one command or in separate commands) passed as argument to the ctc call.

The linker is called with its original argument, expanded to the appropriate runtime library defined in parameter LIBRARY in ctc.ini.

Example (Windows, host applications):
LIBRARY = $(CTCHOME)\lib\ctcwin32.lib,$(CTCHOME)\lib\ctcwin64.lib,/nologo
Example for an adapted HOTA runtime, compiled to object files:
LIBRARY = C:\Projects\Alpha\hota\targdata.obj
LIBRARY + C:\Projects\Alpha\hota\targcust.obj
LIBRARY + C:\Projects\Alpha\hota\targsend.obj

This additional linking is the only task ctc performs for linker calls. Hence you can also link the Testwell CTC++ runtime independently to the test executable. This is useful, for example, when linking an instrumented static library with a (not necessarily instrumented) program.