Is their a reason why on Windows (or any modern OS) you should insist
on compiling and statically links such code. Just create dynamic
libraries or COM objects with decent interfaces and go.
On Dec 14, 2004, at 1:47 PM, Hall, J.C. @ SMO wrote:
> In investigating the subject issue, so far I haven't been able to get a
> straight answer out of anybody. I retrieved several alleged examples
> of how
> this is done from the Internet. Some of them don't work; others work,
> they don't do anything useful, the problem evidently being that
> Visual C++ is not properly linked to the Ada libraries and so can't
> comprehend math functions, text_io, and so on. Such linking
> instructions as
> it's been possible to scrape up off the bottom of the Internet or
> out of vendors is either vague or obviously wrong. I've been told the
> linking has to be done on the Ada side if Ada calls C++, but also if
> the other way around. I've been told the exact opposite. I've been
> it's easy; I've been told it can't be done.
> What we have here is a directory of Ada packages to be integrated with
> system in which the controlling code has been developed in Compaq
> FORTRAN under Microsoft Visual Studio 6.0 for Windows XP on an HP 7500
> According to one alleged authority, the Ada packages cannot be invoked
> directly from FORTRAN--C++ must intervene. Linking to C++, on the C++
> Ada95 object files generated on the ADA side by GNAT Adagide is not a
> problem, provided the Ada code makes no reference to the Ada libraries,
> directly or indirectly (such as containing "+" or "-", for example).
> Attempting to link the Ada libraries to C++ on either the C++ or Ada
> doesn't seem to work, by which I mean I don't know how to do it; but I
> know how to do it because the instructions for linking to Ada on the
> Microsoft side are nonexistent, while the corresponding instructions
> linking to C++ on the Ada side seem to be incomplete.
> My web search led me to one web site on which a frustrated user had
> exactly the same question I have. In 1998. In the intervening six
> there was one response from an expert: "I don't know."
> I would appreciate any information I can get my hands on.