3.11.3.2 Linking a Mixed C++ & Ada Program

Usually the linker of the C++ development system must be used to link mixed applications because most C++ systems will resolve elaboration issues (such as calling constructors on global class instances) transparently during the link phase. GNAT has been adapted to ease the use of a foreign linker for the last phase. Three cases can be considered:

Another alternative is to use the gprbuild multi-language builder which has a large knowledge base and knows how to link Ada and C++ code together automatically in most cases.