comp.lang.ada
 help / color / mirror / Atom feed
* Strange behavior of OpenGLUT
@ 2013-02-27  9:15 ldries46
  2013-02-27  9:36 ` Egil Høvik
  0 siblings, 1 reply; 5+ messages in thread
From: ldries46 @ 2013-02-27  9:15 UTC (permalink / raw)


I am using Open GL in one of my programs therefore I do include the Open GL 
library, the open GLU library and the Open Glut library
with the following calls:

with OpenGL; use OpenGL;
with OpenGL.GLU; use OpenGL.GLU;
with OpenGL.GLUT; use OpenGL.GLUT;

I show the strange behavior by the next code:

procedure display is -- chanced: GLvoid display( GLvoid );
begin
    glClear( GL_COLOR_BUFFER_BIT ); --correctly compiled
    ShowAxis;
    Wall;
    drawTriangles;
   glFlush;                                              --correctly 
compiled
   glutSwapBuffers;                               --NOT correctly compiled
end display;

then I get the following error message:

undefined reference to 'glutSwapBuffers'

while in the OpenGL.Glut package the following is presented:

   procedure glutSwapBuffers;

All calls to OpenGL.Glut subprograms in the file are found to have the same 
error but every variable from this file is correctly compiled
All calls op OpenGL subprograms are also correctly compiled.

I am using the OpenGL-glut.ads  by David Holm 2002-2003

What do I have to do to get this correctly compiled using GNAT GPS 2012

L. Dries








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

* Re: Strange behavior of OpenGLUT
  2013-02-27  9:15 Strange behavior of OpenGLUT ldries46
@ 2013-02-27  9:36 ` Egil Høvik
  2013-02-27 10:45   ` ldries46
  0 siblings, 1 reply; 5+ messages in thread
From: Egil Høvik @ 2013-02-27  9:36 UTC (permalink / raw)


On Wednesday, February 27, 2013 10:15:52 AM UTC+1, ldries46 wrote:
> 
> undefined reference to 'glutSwapBuffers'
> 

This looks like a linker error, not a compiler error. You probably need to link with glut. I guess you already link with opengl, something along the lines of "-lGL", so try to add "-lGLU" or "-lglut" as well.



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

* Re: Strange behavior of OpenGLUT
  2013-02-27  9:36 ` Egil Høvik
@ 2013-02-27 10:45   ` ldries46
  2013-02-27 10:50     ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: ldries46 @ 2013-02-27 10:45 UTC (permalink / raw)


I have  the following links in my grp file:

"-LC:\windows\system32", "-LD:\gcc\lib\freeglut", "-lfreeglut"
In the directory D:\gcc\lib\freeglut the file freeglut.lib is found which 
contains the glut.... subprograms according to Libview



"Egil H�vik"  schreef in bericht 
news:f0430110-bb38-48fe-979b-debab739d93e@googlegroups.com...

On Wednesday, February 27, 2013 10:15:52 AM UTC+1, ldries46 wrote:
>
> undefined reference to 'glutSwapBuffers'
>

This looks like a linker error, not a compiler error. You probably need to 
link with glut. I guess you already link with opengl, something along the 
lines of "-lGL", so try to add "-lGLU" or "-lglut" as well. 




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

* Re: Strange behavior of OpenGLUT
  2013-02-27 10:45   ` ldries46
@ 2013-02-27 10:50     ` Simon Wright
  2013-02-27 11:00       ` ldries46
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2013-02-27 10:50 UTC (permalink / raw)


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

> I have  the following links in my grp file:
>
> "-LC:\windows\system32", "-LD:\gcc\lib\freeglut", "-lfreeglut"
> In the directory D:\gcc\lib\freeglut the file freeglut.lib is found
> which contains the glut.... subprograms according to Libview

I don't know what a grp file is - unless you mean gpr?

It might help to use forward slashes instead of backslashes?

 "-LC:/windows/system32", "-LD:/gcc/lib/freeglut", "-lfreeglut"



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

* Re: Strange behavior of OpenGLUT
  2013-02-27 10:50     ` Simon Wright
@ 2013-02-27 11:00       ` ldries46
  0 siblings, 0 replies; 5+ messages in thread
From: ldries46 @ 2013-02-27 11:00 UTC (permalink / raw)


This gives exactly the same result.

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

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

> I have  the following links in my grp file:
>
> "-LC:\windows\system32", "-LD:\gcc\lib\freeglut", "-lfreeglut"
> In the directory D:\gcc\lib\freeglut the file freeglut.lib is found
> which contains the glut.... subprograms according to Libview

I don't know what a grp file is - unless you mean gpr?

It might help to use forward slashes instead of backslashes?

"-LC:/windows/system32", "-LD:/gcc/lib/freeglut", "-lfreeglut"



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

end of thread, other threads:[~2013-02-27 11:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27  9:15 Strange behavior of OpenGLUT ldries46
2013-02-27  9:36 ` Egil Høvik
2013-02-27 10:45   ` ldries46
2013-02-27 10:50     ` Simon Wright
2013-02-27 11:00       ` ldries46

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