Subject: Re: C++, GLUT, and function pointers.
To: Ingolf Steinbach <Ingolf.Steinbach@jena-optronik.de>
From: Richard Rauch <rkr@olib.org>
List: netbsd-help
Date: 09/12/2003 10:38:00
On Thu, Sep 11, 2003 at 04:24:01PM +0200, Ingolf Steinbach wrote:
> Richard Rauch wrote:
> > So, if I understand the thread correctly, I can register this callback:
> >
> > extern "C" static void callback_fun(int button, int state, int x, int
> > y);
If want to make the function {static} with g++ 3.3, I need to put {braces}
around it:
extern "C"
{
static void ... {}
}
THIS works.
It also works if I drop the {static} qualifier and otherwise have as quoted
in the previous message.
But what is in the previous message does NOT work, if done exactly as shown.
g++ complains about multiple storage class qualifiers for the function.
At least I have killed off the name-space pollution. Now the only drawback
is that the code is ugly. (^&
Thanks a lot for the pointer (no pun intended, but there it is).
--
"I probably don't know what I'm talking about." http://www.olib.org/~rkr/