From: Shark8 <onewingedshark@gmail.com>
Subject: Linking/aspect error. [OpenGL]
Date: Fri, 12 Oct 2012 15:07:19 -0700 (PDT)
Date: 2012-10-12T15:07:19-07:00 [thread overview]
Message-ID: <29f361fe-613a-426f-a03f-9dcfb02d696a@googlegroups.com> (raw)
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?
next reply other threads:[~2012-10-12 22:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 22:07 Shark8 [this message]
2012-10-13 5:06 ` Linking/aspect error. [OpenGL] Shark8
2012-10-13 7:59 ` Dmitry A. Kazakov
2012-10-13 14:37 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox