Troubleshooting Command Line Usage

Command Line Interface

The following information might help if you encounter any problems when using the command line tools.

 

Failure

Response

Compilation fails

Ensure that the selected Target Deployment Port matches your compiler; there may be several Target Deployment Ports for one OS, each of which targets a different compiler. If you are unsure, you can check the full name of a Target Deployment Port by opening any of the .ini files located in the Target Deployment Port directory.

Compiler reports that options.h is missing

Ensure that you have correctly prepared the options.h file, and that this file is located in a directory that is searched by your compiler (this is usually specified with -I or /I option on the compiler command line).

Compiler reports that TP.h file is missing

If you are compiling on a target different from the host where the generated file has been produced, double-check the above specific requirements to compilation on a different target.

If the compiler and C/C++ Test Script Compiler are executed on the same machine, ensure you have not used the -NOPATH option on the Test Script Compiler command line, and that the ATLTGT environment variable was correctly set while the Test Script Compiler was executed.

Compilation fails

Ensure that the selected Target Deployment Port matches your compiler; there may be several Target Deployment Ports for one OS, each of which targets a different compiler. If you are unsure, you can check the full name of a Target Deployment Port by opening any of the .ini files located in the Target Deployment Port directory.

TDP compilation fails

When using the -I- linker option, the TDP fails to compile. This is because the following line is added to the instrumented file:

#include "<path to target directory>/TP.h"

where TP.h includes other files using the #include syntax, such as:

#include "atlclock.h"

where atlclock.h is in the same directory as "TP.h". If you use the -I- flag, the compiler no longer searches the same directory as the current file (TP.h) and therefore cannot find atlclock.h.  If you cannot remove the -I- flag, you must add a -I flag for the compiler to find the include files required by the TDP.

Linkage fails because of undefined references

Ensure you have successfully compiled the Target Deployment Port library object, and have included it in your linked files

Ensure you have correctly configured the products.h options file.

If you are using a test feature, ensure that you are linking both source under test and additional files. You may also want to add some stubs in your .ptu or .otd test script.

Ensure the options set in options.h (if required) are coherent with the options set in products.h.

Errors are reported through #error directives

 

You may have selected a combination of options in products.h which is incompatible. The error messages help you to locate the inconsistencies.