Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On Windows, run your compilation and link commands as you normally would but replace your compiler command with the insure command:

insure <OPTIONS> <OUTPUT_FILE> <INPUT_FILE> 

On Windows systems, the the compiler is always cl (Microsoft's compiler), so there is no need to include cl as part of the command.

In For example, the following example, Insure++ is command could be used to compile and link the the hello.c example into hello.obj:

cl /c /Zi /EHsc hello.c 

To compile with Insure++, replace the compiler command with insure:

insure -o -c hello hello.c/c /Zi /EHsc hello.c 

Similarly, you can link .obj files into an .exe file by replacing link command with inslink:

inslink /debug hello.exe 

On Unix systems, the simplest way to compile and link source code with Insure++ is to prepend your normal compile and link command lines with the insure command. The following table shows some examples for Unix systems:

...

Without Insure++With Insure++
gcc -c foo.cinsure gcc -c foo.c
g++ -c bar.ccinsure g++ -c bar.cc
/usr/local/gcc-3.4.0/bin/g++ -c g bar.cc -o barinsure /usr/local/gcc-3.4.0/bin/g++ -o g bar foo.cc -o bar.o

You can use the same options that you normally use to compile and link your program. For example, you would use the following command to to build bubble1.c:

...

If you have a makefile that uses the variable CC to define the compiler name, you can build your program with Insure++ by using the command make CC=’insure . cc’.

Insure Command Line Options

If necessary, you can use the following options with Insure++:

OptionDescription
-ZcovCompiles and links for code coverage. No error checking is performed.
-Zoi <OPTION>Runs Insure++ with a specific option. Refer to the Configuration Options (psrc) section for available options.
-Zop <FILE>Runs Insure++ with a specific .psrc file. Refer to the Configuration Options (psrc) section for additional information about .psrc files.
-ZslRuns Insure++ in safe link mode, which may be necessary on some platforms. Insure++ will print a message to the console indicating when safe link mode is necessary.