Share via


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.

Security noteSecurity Note

This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.

To get samples and instructions for installing them:

To access samples from Visual Studio

  • On the Help menu, click Samples.

    By default, these samples are installed in drive:\Program Files\Microsoft Visual Studio 10.0\Samples\.

  • For the most recent version of this sample and a list of other samples, see Visual Studio Samples on the MSDN Web site.

Building and Running the Sample

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.

See Also

Other Resources

General Samples