[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fltk backend and undefined gluOrtho2D
From: |
Jeff Keacher |
Subject: |
Re: fltk backend and undefined gluOrtho2D |
Date: |
Wed, 22 Jul 2009 14:00:50 -0700 (PDT) |
John W. Eaton-3 wrote:
>
> 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=1rxvirtual
> void
> | > | OpenGL_fltk::draw_overlay()�3u=1ry:
> | > | ./DLD-FUNCTIONS/fltk_backend.cc:145: error: �3u=1rxgluOrtho2D�3u=1ry
> 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?
>
Indeed, gluOrtho2D is declared in GL/glu.h. I included it (indirectly) via
FL/glu.h mainly for consistency with the other includes in that file, which
tend to pull from the FL directory.
Curiously, Octave's configuration script seems to find GL/glu.h, as it
defines HAVE_GL_GLU_H. Since that is defined, GL/glu.h should be included
via gl-render.h, which of course is included conditionally if HAVE_GL_GLU_H
is defined -- but that didn't seem to be happening.
To make matters worse, I backed out the change to fltk_backend.cc, ran make
clean, and tried the build again in an attempt to reproduce the problem.
This time the build completed without errors. Odd. I assume that something
is sticking around from the previous builds, but I'm not sure what it could
be.
Jeff
--
View this message in context:
http://www.nabble.com/fltk-backend-and-undefined-gluOrtho2D-tp24513000p24614534.html
Sent from the Octave - General mailing list archive at Nabble.com.