fltk backend and undefined gluOrtho2D

John W. Eaton jwe at octave.org
Tue Jul 21 18:44:27 CDT 2009


On 21-Jul-2009, teuobk wrote:

| John W. Eaton-3 wrote:
| > 
| > On 16-Jul-2009, Alexander Barth wrote:
| > 
| > | Hi all,
| > | I try to compile a recent checkout of octave (from
| > | http://www.octave.org/hg/octave). The compilation fails at:
| > | 
| > | ./DLD-FUNCTIONS/fltk_backend.cc: In member function $,3u=(B1rxvirtual void
| > | OpenGL_fltk::draw_overlay()$,3u=(B1ry:
| > | ./DLD-FUNCTIONS/fltk_backend.cc:145: error: $,3u=(B1rxgluOrtho2D$,3u=(B1ry was not
| > | declared in this scope
| > | 
| > | I have fltk version 1.1.7. Is this version recent enough? On my system
| > | gluOrtho2D is declared in /usr/include/GL/glu.h but this file is not
| > | included in fltk_backend.cc.
| > 
| > On my system, /usr/include/GL/glu.h is part of the libglu1-mesa-dev
| > package, and the version of that package is 7.0.3.  I also have
| > version 1.1.9 of libfltk1.1-dev. 
| > 
| 
| Ran into this problem, too.  I have fltk 1.1.9 on an Intrepid-release Ubuntu
| box, and I was trying to compile Octave 3.2.0 from source.  My solution was
| to edit fltk_backend.cc to #include <FL/glu.h> .  Now everything builds
| fine, and all of the integrated tests pass.

Strange that you need to include this file and I don't.  Does anyone
know why that might be?

At least on my system, the file FL/glu.h doesn't appear to declare
gluOrtho2D directly, but gets the declaration when it includes
GL/glu.h.

The file src/DLD-FUNCTIONS/fltk_backend.cc includes gl-render.h which
includes GL/glu.h if it exists.  So if everything is configured
correctly, I think the symbol gluOrtho2D should be defined correctly,
and no changes should be required.

Does your system have GL/glu.h?  Does it provide a declaration for
the gluOrtho2D function?  Does Octave's configure script find GL/glu.h
and define HAVE_GL_GLU_H on your system?

jwe


More information about the Help-octave mailing list