TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Tucker Taft <[log in to unmask]>
Fri, 23 Jan 1998 13:19:11 -0500
text/plain (24 lines)
> No one has mentioned what we have found is the number one problem
> with mixing Ada and C++, and that is controlling
> the elaboration of class object
> instances.  Ada has a well defined API (adainit) that can be called,
> but C++ doesn't (in the numerous compilers we have used).
> ...
> The best bet is to use the same venders compiler for both languages,
> or by making C++ the main, and having it call the adainit ...

This seems like the simplest approach.  Make C++ the main routine
as long as you have any C++ code in the program.  However, if
your C++ compiler allows you to create a DLL, then the necessary
initialization should happen automatically as part of attaching
to the DLL.

> -scott

> ps. anyone know if the ISO standard for C++ will include elaboration control
> at the API level?

I don't believe so.

-Tucker Taft  [log in to unmask]

ATOM RSS1 RSS2