Next: , Previous: Temporary Files, Up: Microsoft Windows Topics


G.5 Mixed-Language Programming on Windows

Developing pure Ada applications on Windows is no different than on other GNAT-supported platforms. However, when developing or porting an application that contains a mix of Ada and C/C++, the choice of your Windows C/C++ development environment conditions your overall interoperability strategy.

If you use gcc to compile the non-Ada part of your application, there are no Windows-specific restrictions that affect the overall interoperability with your Ada code. If you plan to use Microsoft tools (e.g. Microsoft Visual C/C++), you should be aware of the following limitations:

If you do want to use the Microsoft tools for your non-Ada code and hit one of the above limitations, you have two choices:

  1. Encapsulate your non-Ada code in a DLL to be linked with your Ada application. In this case, use the Microsoft or whatever environment to build the DLL and use GNAT to build your executable (see Using DLLs with GNAT).
  2. Or you can encapsulate your Ada code in a DLL to be linked with the other part of your application. In this case, use GNAT to build the DLL (see Building DLLs with GNAT) and use the Microsoft or whatever environment to build your executable.