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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d697b01c3a3eafc1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: Calling C++ procedures from Ada - Linkage problem Date: Tue, 24 May 2005 10:55:05 +0000 Message-ID: <1473064.DHiecbuf2s@jellix.jlfencey.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: individual.net RDoMiy2ZnD9erEixThS8LgS+8UOJY84ve1ESbM3U09tg2qBjyv X-Phone: +41 62 961 13 52 X-Mood: If you knew, I had to kill you. Xref: g2news1.google.com comp.lang.ada:11135 Date: 2005-05-24T10:55:05+00:00 List-Id: Ken Resander wrote: [...] > /* > void calltosee ( ) > { > //=C2=A0=C2=A0called=C2=A0this=C2=A0from=C2=A0a=C2=A0c++=C2=A0program= =C2=A0compiled=C2=A0and=C2=A0linked=C2=A0by > //=C2=A0=C2=A0VC6.=C2=A0Used=C2=A0disassembler=C2=A0in=C2=A0debug=C2=A0= window=C2=A0and > //=C2=A0=C2=A0found=C2=A0that: > int=C2=A0h=C2=A0; > char=C2=A0dst=C2=A0[=C2=A0100=C2=A0]=C2=A0; > openhandler_c=C2=A0(=C2=A0&h)=C2=A0;=C2=A0=C2=A0//=C2=A0this=C2=A0con= tains=C2=A0a=C2=A0_chkesp=C2=A0call [...] Well, it seems that VC++ is generating the stack checking stuff. A web search seems to reveal that this is only when "VC generates debug code" (whatever this means). ;) So I'd say, switch VC to "release code generation" (whatever that might mean) or just declare an Ada routine called chkesp with C interface (well, "pragma Inline" won't work then, I suppose). BTW, according to the routine is contained in the msvcrt dll. Vinzent. --=20 worst case: The wrong assumption there actually is one.