This documentation is archived and is not being maintained.

ccWrapper Sample: Demonstrates How to Map C/C++ Compiler Flags from Other Compilers to Visual C++

ccWrapper shows how to programmatically map flags from other compilers to the Visual C++ compiler. The included configuration file is used only as an example, not as an official way of showing how the flags map from one architecture to another, and is configurable so that you can change the configuration. For more information, see the README.htm file.


This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

To get samples and instructions for installing them:

  • On the Visual Studio Help menu, click Samples.

    For more information, see Visual Studio Samples.

  • The most recent version and complete list of samples is available online from the Visual Studio 2008 Samples page.

  • You can also locate samples on your computer's hard disk. By default, samples and a Readme file are copied into a folder under \Program Files\Visual Studio 9.0\Samples\. For Express editions of Visual Studio, all samples are located online.

To run this sample

  1. Open the solution GccWrapper.sln.

  2. On the Build menu, click Build Solution.

  3. At the command prompt, copy the GccWrapper and config files to the TinyXML folder:

    copy Release\GccWrapper.exe Examples\TinyXML\gcc
    copy ccFile.cgf Examples\TinyXML
  4. At the command prompt, move to the TinyXML folder:

    cd Examples\TinyXML
  5. Run Make.exe by entering make at the command prompt.

    Note that you will receive multiple errors because /Wall is set, but xmltest.exe is being built.

  6. Run xmltest.exe by entering xmltest.exe at the command prompt.