Frequently Asked Question

C-CODE / AUTOSAR: Code Generation with CTC++ is not working
Last Updated 9 days ago

If you are trying to measure the code coverage with CTC++ using the C\C++-platform or AUTOSAR platform and the compilation fails there are a few things to check that explain many of those failures.

Please make sure that settings in TPT -> Preferences -> CTC++ contains the path to a valid CTC-installation. The default value is ${CTCHOME}. If this is the case please open a commandline window and execute "echo %CTCHOME%" . The command line should print the path to your CTC -installation. If this is not the case please make sure that the environment variable of CTCHOME is set to your CTC-Installation.

If the compilation of your testframe still fails after that, please make sure the CTC Installation is contained in the PATH variable of windows. Many CTC compilation errors can be resolved by ensuring those settings.

If the error is something like "ctc.ini file is missing" you can manually add the path to your ctc.ini file under Settings -> Preferences -> CTC++. Usually the ctc.ini file is directly in your CTC installation folder.

A common issue when using MinGW with CTC is that during linking, errors about the inability to find -lctc appear. Sometimes this can be resolved by opening the ctc.ini file in the CTC installation. Under the seperator [GNU gcc] is a line like 

LIBRARY = -L$(CTCHOME)\lib\x86_64,-lctc 

This line can be replaced by 

#LIBRARY = -L$(CTCHOME)\lib\x86_64,-lctc

LIBRARY = $(CTCHOME)\lib\ctcwin32.lib

Please Wait!

Please wait... it will take a second!