OpenGL in D2

Sequ user at example.net
Wed Feb 23 02:32:17 PST 2011


Quoted from Nrgyzer:
> On windows you've to create a folder called "lib"
> before you run the command above - I currently
> can't say it exactly if it's needed on linux, too.
I did need to create a 'lib' directory before running 'make -flinux.mak DC=dmd'.

> After it compiled, you can copy all the created
> lib-files to the lib-folder
My 'lib' folder was in /usr/lib, although that folder didn't contain 'phobos.lib',
but 'libphobos2.a'. Hopefully that works correctly.

> Copy the content of the "import"-dir to a
> location where you've all your binding for D
For now, I've just copied it into an 'import' folder in the same folder as my
source code. I suspect the correct directory is '/usr/include/d/dmd/druntime/import'.

I got an SDL example working by then using the command:
dmd -L-lDerelictGL -L-lDerelictGLU -L-lDerelictUtil -L-lDerelictSDL test_sdl.d
but unfortunately I couldn't get my example working, because it requires GLUT and
the derelict library doesn't have that included. I'd actually prefer to use GLUT
and also, eventually, other obscure C libraries that I know no-one else would have
ported, but I suppose I'll take a look at the links provided in Trass3r's post
before asking more about that.

> I hope this helped :)
Thanks, yes that was quite helpful!

Quoted from Dmitry Olshansky:
> Sadly your file goes like rubbish for me, is
> that base64 ?
Yeah, I see it turned out odd, but I'm using the web interface to post here (it
seems my Thunderbird in the Lab can't access the news server from behind all the
firewalls - or something). The file is actually just one of the first examples
from the OpenGL tutorials.


More information about the Digitalmars-d-learn mailing list