comp.lang.ada
 help / color / mirror / Atom feed
From: David Holm <david@realityrift.com>
Subject: Re: Ada OpenGL bindings, how to use them with gnat ?
Date: Fri, 18 Jul 2003 13:32:15 GMT
Date: 2003-07-18T13:32:15+00:00	[thread overview]
Message-ID: <20030718153217.761d0b41.david@realityrift.com> (raw)
In-Reply-To: 4a1641ae.0307180239.4222f084@posting.google.com

On 18 Jul 2003 03:39:57 -0700
fab102@bluemail.ch (Karim) wrote:

> Hello David 
> 
> It still doesn`t work. I tried to compile the adaglut example in the
> adaopengl-0.10/examples/adaglut dir.
> The command was like this :
> gnatmake adaglut.adb -I/usr/home/karim/ada/adaopengl-0.10/adaopengl
> -largs
> -L/usr/X11R6/lib -lX11 -lXext -lGL -lGLU -lglut 
> 
> Get this msg: 
> /usr/local/lib/gcc-lib/i386-unknown-freebsd5.1/2.8.1/adalib/libgnat.so:
> warning: mktemp() possibly used unsafely; consider using mkstemp()
> /usr/X11R6/lib/libglut.so: undefined reference to
> 'glXBindChannelToWindowSGIX'
> /usr/X11R6/lib/libglut.so: undefined reference to
> 'glXQueryChannelDeltasSGIX'
> /usr/X11R6/lib/libglut.so: undefined reference to
> 'glXChannelRectSyncSGIX'
> /usr/X11R6/lib/libglut.so: undefined reference to 'glXChannelRectSGIX'
> /usr/X11R6/lib/libglut.so: undefined reference to
> 'glXQueryChannelRectSGIX'

Seems some symbols are missing in your libGL.so.
Try "nm /usr/X11R6/lib/libGL.so|grep glXQueryChannelRectSGIX" and "nm
/usr/X11R6/lib/libGL.a|grep glXQueryChannelRectSGIX" it should say something like:
0004b8dc T glXQueryChannelRectSGIX

(the number at the beginning may vary depending on your OpenGL lib). I'm using nVidias OpenGL
library, both on linux and FreeBSD.

> 1. It seems that gnatmake has problem to find glx lib . Is this,
> because I don`t installed adabinx ? I looked on the adabinx page, and
> there is written this is for Linux. Does it also work on FreeBSD ?
> Should I install the adabindx.

AdaBindX is only necessary in case you want to use glX directly. If you use glut you won't need
it.

> 2. I also tried to locate my glx module, lib or whatever. I found only
> this libs installed in /usr/X11R6/lib :
> libGL.so / libGL.so.1 / libGLU.a / libGLU.so / libGLU.so.1 /
> libGLcore.so /
> libGLcore.so.1 /lbGLw.a   but none glx lib .  Are the libs o.k ? 
> Where is the glx stuff ?

It should be in libGL.so

> (I have installed the last FreeBSD nvidia driver and mesa)

If you have both installed it is quite possible that Mesa overwrote your nVidia OpenGL libs.
Make sure you have no conflicting libGL* in /usr/local/lib
 
> 
> 3. General. I get the message "mktemp probaly unsafed..." each time I
> compile code with gnatmake. What`s this all about ? It doesn`t matter,
> but perhaps I can fix it .

gnat 3.15p in FreeBSD uses mktemp and not mkstemp. If you want to fix it you need to modify the
gnat source and submit a patch (the source is very clean so it shouldn't be difficult).

//David Holm



  reply	other threads:[~2003-07-18 13:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-15 16:01 Ada OpenGL bindings, how to use them with gnat ? Karim
2003-07-16 23:03 ` David Holm
2003-07-17 16:37   ` chris.danx
2003-07-17 18:45     ` David Holm
2003-07-17 20:42   ` Karim
2003-07-17 21:23     ` David Holm
2003-07-18 10:39       ` Karim
2003-07-18 13:32         ` David Holm [this message]
2003-07-18 16:26           ` chris.danx
2003-07-18 17:24             ` David Holm
2003-07-18 21:46               ` Karim
2003-07-19 10:00                 ` David Holm
2003-07-22 14:28                   ` Karim
2003-07-22 14:59                     ` David Holm
replies disabled

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