Compiling the target application

CodeXL

PreviousNext
CodeXL User Guide
Help > Tutorials > CPU Profiler Tutorial > How to use CPU Profiler Control APIs > Compiling the target application
Compiling the target application

To compile the application on Microsoft Visual Studio, update the configuration properties to include the path of header file, DLL file, LIB file of AMDTActivityLogger.

To compile a C++ application on Linux using G++, use the following command:

$ g++ -std=c++0x <source-file.cpp> -L<CODEXL-INSTALL-DIR>/SDK/AMDTActivityLogger/bin/x86_64/ -L<CODEXL-INSTALL-DIR> -I<CODEXL-INSTALL-DIR>/SDK/AMDTActivityLogger/include -lAMDTBaseTools -lAMDTOSWrappers -lAMDTActivityLogger -lrt –ldl

You may choose to use 2011 C++ standard or newer C++ standard while compiling C++ target application with profile control APIs.

To compile a C application on Linux using GCC, use the following command:

$ gcc <source-file.c> -L<CODEXL-INSTALL-DIR>/SDK/AMDTActivityLogger/bin/x86_64/ -L<CODEXL-INSTALL-DIR> -I<CODEXL-INSTALL-DIR>/SDK/AMDTActivityLogger/include -lAMDTBaseTools -lAMDTOSWrappers -lAMDTActivityLogger -lrt