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-7-bit X-Google-Thread: 103376,c910ec7af58d6d4b X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,c910ec7af58d6d4b X-Google-Attributes: gid109fba,public From: beckwb@ois.com (R. William Beckwith) Subject: Re: Ada/C++ interface (SPARC Works) Date: 1995/04/22 Message-ID: <3nc0jl$3ng@gamma.ois.com>#1/1 X-Deja-AN: 101369120 references: followup-to: comp.lang.ada,comp.lang.c++ organization: Objective Interface Systems, Inc. newsgroups: comp.lang.ada,comp.lang.c++ Date: 1995-04-22T00:00:00+00:00 List-Id: Deepak Kumar (dkumar@blackcat) wrote: : Has anyone tried to interface/use C++ code through Ada programs successfully : using the SUN Ada and SUN C++ compilers? : I have some code that uses a C library function, I compile this with the : SPARC C++ compiler and it doesn't link with the Ada code. if I compile : it with GCC it links just fine. C++ compilers mangle function names. You either must have or define a C only interface. You can tell the C++ compiler not to mangle certain C code: extern "C" { ... }; Then compile the code with the Sun C++ compiler. Your Ada pragma's can then resolve to the unmangled names.