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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e8856531bb6faeb5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.89.65 with SMTP id bm1mr1579793pab.34.1350115208981; Sat, 13 Oct 2012 01:00:08 -0700 (PDT) Path: s9ni5008pbb.0!nntp.google.com!news.glorb.com!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Linking/aspect error. [OpenGL] Date: Sat, 13 Oct 2012 09:59:53 +0200 Organization: cbb software GmbH Message-ID: <1iy9nc2svkm9h$.o0gh1p2td36m.dlg@40tude.net> References: <29f361fe-613a-426f-a03f-9dcfb02d696a@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-10-13T09:59:53+02:00 List-Id: On Fri, 12 Oct 2012 15:07:19 -0700 (PDT), Shark8 wrote: > Taking the last entry, the one for glPopName corresponds to the following in TAO_GL.Functions.adb: > procedure glPopName > with Import, Convention => stdcall[, link_name => "glPopName"]; > However, that particular error goes away if I use this form: > procedure glPopName; Pragma Import (StdCall, glPopName, "glPopName"); > > {Omission of the link_name aspect makes the error display `glPopName@0'} > > My question is why the difference? Shouldn't the > Import/convention/link_name be exactly equivalent to using the import > pragma? In pragma you specified the external name, in aspect you did the link name (J.15.5). The link name (proper name of the entry point) has the @n suffix. The compiler knows how to mangle the external name in order to get at the link name. Normally you should not interfere. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de