All the below MUST be done from the standard cmd-line-console interface. Here are the two standard references we use, its very important to template your system @ the beginning. [ NOTE THIS MUST BE DONE FROM THE CONSOLE/CMD-LINE ENVIRONMENT ]. It is imperative that you NOT skip the C config, as g++ is just a C compiler 'gcc' with C++ support. The C is the default basic config for the g++ compiler. Please understand that the particular GNU compiler that you wish to emulate may not be invoked with 'cc' and/or 'gcc', the use below of 'gcc' is simply a generic abstraction. Note that ALL #include or any system header is system DEPENDENT, every installation of a compiler creates a unique set of system-headers. Never use headers for a compiler other than those headers that we're installed by that compiler using those headers. For codecheck to have a PERFECT-EMULATION you must provide the search path-list of system-headers to codecheck in the exact order used by the correctly installed compiler that you wish to emulate. Once you have a correct codecheck emulation you need not have that compiler installed on a system, you simply just need to have access to the correct system-headers somewhere on the network. The CAVEATS for 'Embedded Emulation' are at the end of this document. * We have included text and script. Your analysis MUST be error free in order to correct perfect data that can be used for a perfect emulation. [See bottom of this file for exact definition of test.c & test.cpp] gcc -v -c -ansi test.c 2> test.c.txt // pipe output to test.c.txt gcc -v -c -ansi test.cpp 2> test.cpp.txt // pipe output to test.cpp.txt gcc -E -c -ansi test.c > test.c.i // send us test.c.i gcc -E -c -ansi test.cpp > test.cpp.i // send us test.cpp.i From the above we can build you a custom gcc_c.ccp & gcc_cpp.ccp for your system. ** test.c // MUST BE JUST LIKE THIS #include // this line only, see end-of-doc for embedded case ** test.cpp // MUST BE JUST LIKE THIS /* if is NOT found, then use */ #include // this line only * There will be a CCP file for each C or C++, for each linux version, for each gcc compiler version you wish to support. * #! /bin/sh -xv # C # std c compiler cc -v -c -ansi test.c 2> test.c.txt cc -E -c -ansi test.c > test.c.i cc -P -c -ansi test.c > test.c.p # GNU c compiler gcc -ansi -c -H test.c 2> test.c.h # C++ # std C++ compiler cxx -v -c -ansi test.cpp > test.cpp.txt 2>&1 cxx -E -c -ansi test.cpp > test.cpp.i cxx -P -c -ansi test.cpp > test.cpp.p cxx -H -c -ansi test.cpp 2> test.cpp.h // this is a re-write # GNU c++ compiler g++ -ansi -c -H test.cpp 2> test.cpp.h // this is a duplicate, please create a unique name ----** GCC on ALL operating system ** ------------ These days folks are running GCC on AIX, Sparc, Windows, and of course Linux. There are others, but I have just listed the most common. CodeCheck of course support ALL GCC for ALL operating systems. Below we only expand the GCC on Windows case, the other cases are fairly similiar. All information to construct the CCP files shown below, came directly from the "cc -c - v test.c" information found above. ..... ** GCC C On Windows 2K ** ................ Given the "test.c" case above compilation with codecheck on windows would be check gnu_c.ccp test.c The contents of gnu_c.ccp are ... ::gnu_c.ccp // start of file #force GNU GCC C compiler mode -k8 -D__extension__= -D__inline__=inline # gcc C macros for 686 cygnus -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D_X86_=1 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__tune_pentium2__ -D__tune_pentium3__ -D__i386__ -D__i386 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix # #include search paths for C cygnus 686 -I/usr/include/w32api/ -I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/ -I/usr/include/ ::GNU_C.CCP // end of file ** GCC C++ On Windows 2K C++ is is very similiar to C above, basically the major change is the path's for the header files. Usage is ... check gcc_cpp.ccp test.cpp ::GCC_CPP.CCP // START OF FILE # config codecheck for GCC/GNU extensions -k8 # cygnus 686 gcc c++ macros -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D_X86_=1 -D_X86_=1 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__tune_pentium2__ -D__tune_pentium3__ -D__i386__ -D__i386 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix # cygnus c++ header file path's -I/usr/include/w32api -I/usr/include/c++/3.2 -I/usr/include/c++/3.2/i686-pc-cygwin -I/usr/include/c++/3.2/backward -I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include -I/usr/include *** EMBEDDED SYSTEM EMULATION *************** Because embedded compiler's don't use and/or you must use a generic NON-IO system-header to obtain emulation data. Given that you produce embedded systems, then you should substitute the with that way in effect most c++ system headers get verified. What we're saying is that for Embedded its best to test like .. #include // C test with installed working compiler [ test.c ] #include // C++ test with installed working compiler [ test.cpp ] What you need to do now is for ALL your testing emulation create a test.c and test.cpp that have the above, and generate the test.* from each properly installed compiler with NO errors. Then you'll have good data to properly write your codecheck config [ CCP ] files in an EMBEDDED C/C++ Emulation Mode.