From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,31c633ee5da73ed9 X-Google-Attributes: gid103376,public From: gisle@apal.ii.uib.no (Gisle S�lensminde) Subject: Re: Ada and C++; Any Gurus Out There? Date: 1999/06/02 Message-ID: #1/1 X-Deja-AN: 485015488 Content-Transfer-Encoding: 8bit References: Organization: University of Bergen, Norway Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-06-02T00:00:00+00:00 List-Id: >Now, I know one can declare the C++ function as 'extern "C" blah blah' but >this really is a work around and not a >solution. I am looking for a way to simply link Ada and C++ object files >such that no modifcations need to >be made to the C++ code. It is not possible to link C++ to other languages without using extern C in a portable way. There is no standard mangeling scheme, and it may vary from compiler to compiler, even on the same OS. Extern C in C++ is in many ways similar to pragma import/export in Ada, since both specifies a different linker convention from the default for the language. Using 'extern C' is not a workaround, but the intended solution. -- Gisle S�lensminde ( gisle@ii.uib.no )