comp.lang.ada
 help / color / mirror / Atom feed
* Linking/aspect error. [OpenGL]
@ 2012-10-12 22:07 Shark8
  2012-10-13  5:06 ` Shark8
  2012-10-13  7:59 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 4+ messages in thread
From: Shark8 @ 2012-10-12 22:07 UTC (permalink / 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?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-13 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-12 22:07 Linking/aspect error. [OpenGL] Shark8
2012-10-13  5:06 ` Shark8
2012-10-13  7:59 ` Dmitry A. Kazakov
2012-10-13 14:37   ` Shark8

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox