Altova MapForce 2023 Enterprise Edition

Generating C++ code

Home Prev Top Next

You can generate C++ code for Visual Studio 2013, 2015, 2017, 2019, 2022. The generated code includes .sln and .vcproj files for Visual Studio. Note the following when generating code:


Certain MapForce features are not supported in generated program code. For details, see Supported features in generated code.

You can generate code either from a single mapping design (.mfd), or from a mapping project (.mfp). If you generate code from a single mapping, the resulting application executes the respective mapping transformation. If you generate code from a MapForce project (.mfp) which includes multiple mappings, the resulting application executes in bulk all mappings included in the project.

You can change the general code generation options from the Tools | Options menu, Generation tab. See Code Generator Options.

You can change the name of the generated mapping application and other settings from the File | Mapping settings menu. The default application name is Mapping. See also Changing the Mapping Settings.

For information about handling paths in generated code, see Paths in Various Execution Environments.

If your mapping contains database components, you can view database specific settings by clicking a database component, and then selecting the menu option Component | Properties. See Database Component Settings.

Support for database connections varies by platform and there are connection kinds that are not supported on all platforms. If your mapping connects to a database, choose a database connection that is compatible with the target environment for which you generate code. For details, see Database mappings in various execution environments.


A typical C++ solution generated by MapForce includes the following:


Several Altova-signed libraries required by the mapping (all prefixed with Altova).

The main mapping project (in this example, Mapping), which includes the mapping application and dependent files.


Sample C++ solution generated with MapForce

This section includes the following topics:


Generating code from a mapping

Generating code from a mapping project

Building the project

Running the application

© 2016-2022 Altova GmbH