Problems with OpenGL bindings and D2

Bill Baxter wbaxter at gmail.com
Tue Sep 16 16:02:59 PDT 2008


On Wed, Sep 17, 2008 at 5:53 AM, Simen Kjaeraas <simen.kjaras at gmail.com> wrote:
> I'm using the OpenGL bindings from the Bindings project on dsource, and get a bunch of Symbol Undefined errors, for _glViewport, _glMatrixMode, etc...
>
> Now, I'm including opengl32.lib using a pragma, and have also tried doing it from the command line. I seem to remember there being something about this no longer working:
>
>        version (Windows) {
>                extern (Windows):
>        } else {
>                extern (C):
>        }
>        // functions defined here
>
> So I changed that to "extern (Windows):" in gl.gl and gl.glu, and got nicer names, which might be a good thing.
>
> Any ideas to what I'm doing wrong?

I believe the scoping was changed so that the extern(): block  no
longer continued to the end of file.  The fix added to make everyones
programs compile again was "extern(System):" which can be used without
a version block, and basically acts like "extern(Windows):" on windows
and "extern(C):" everywhere else.

--bb


More information about the Digitalmars-d-learn mailing list