comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: Re: ADA and Open GL
Date: Wed, 10 Aug 2011 16:24:39 +0200
Date: 2011-08-10T16:24:39+02:00	[thread overview]
Message-ID: <4e4294a5$0$2593$703f8584@news.kpn.nl> (raw)

If this message is send twice, please forgive but to me it seems as if the 
message was not send

I did what you suggested. and with only one pragma for a function pointer it
worked.
But I got now a number of message of this kind:

E:/ada/project/Blastula/visualize.adb:289: undefined reference to
`glutSwapBuffers'

I got the same messages for the glSomething routines and adding:
"-LC:\windows\system32" to the linker options solved these These routines
are in openGL32.dll
The errors in the other routines were not solved although these are
positioned in Glu32.dll and Glut32.dll both also in the C:\Windows\System32
directory

"Simon Wright"  schreef in bericht news:m2liv134lb.fsf@pushface.org...

"ldries46" <bertus.dries@planet.nl> writes:

> My program seems correct now, but I get the following error message:
>
> opengl-glu.ads:373:31: warning: subprogram pointer
> "gluNurbsCallback.CallBackFunc" should have foreign convention
> opengl-glu.ads:373:31: warning: add Convention pragma to declaration
> of "GLU.GLUFUNCPTR" at line 231
>
> This is found in a standard unit nl. the adabindings to Open GL, GLU
> and GLUT
>
> Can I disregard this warning or should I do something to avoid it. I
> don't thoink I should be altering my copy of the ADA bindings so
> where should I do something.
> In my program I don't call this routine directly soit is a result of a
> call from another routine within the ADA bindings.

Perhaps you're compiling with a different set of compiler options than
those used by the developer of the bindings?

Very often, GNAT will in fact translate iffy code like this correctly
(the compiler backend understands C, of course). Better not to risk it,
though, convention errors can be a real pain to debug.

Those bindings aren't "standard" in the RM sense. Personally I'd make
the change and send a patch to the bindings maintainer. 




             reply	other threads:[~2011-08-10 14:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 14:24 ldries46 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-09 14:31 ADA and Open GL ldries46
2011-08-09 14:48 ` Georg Bauhaus
2011-08-09 14:51 ` Simon Wright
2011-08-10  8:58 ` ldries46
2011-08-10 11:09   ` Simon Wright
2011-08-10 13:23     ` ldries46
2011-08-10 15:35       ` Simon Wright
replies disabled

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