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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e8856531bb6faeb5,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.242.68 with SMTP id wo4mr1537137pbc.1.1350079640102; Fri, 12 Oct 2012 15:07:20 -0700 (PDT) Received: by 10.68.240.103 with SMTP id vz7mr1566579pbc.10.1350079640081; Fri, 12 Oct 2012 15:07:20 -0700 (PDT) Path: s9ni3442pbb.0!nntp.google.com!kt20no30173358pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 12 Oct 2012 15:07:19 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.20.190.126 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <29f361fe-613a-426f-a03f-9dcfb02d696a@googlegroups.com> Subject: Linking/aspect error. [OpenGL] From: Shark8 Injection-Date: Fri, 12 Oct 2012 22:07:20 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-10-12T15:07:19-07:00 List-Id: I've been making an Open-GL binding for Ada2012, the most tedious part was getting the parameters typed such that a function cannot call one of the OpenGL functions with bad enumeration arguments. Anyway, trying to link this spits out a bunch of errors: [...] C:\Programming\Projects\TAO_GL\obj\TAO_gl.Functions.o:TAO_gl.Functions.adb:(.text+0x2178): undefined reference to `glendlist@0' C:\Programming\Projects\TAO_GL\obj\TAO_gl.Functions.o:TAO_gl.Functions.adb:(.text+0x8378): undefined reference to `glinitnames@0' C:\Programming\Projects\TAO_GL\obj\TAO_gl.Functions.o:TAO_gl.Functions.adb:(.text+0x8428): undefined reference to `glPopName' collect2: ld returned 1 exit status 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?