Win32 + OpenGL bindings
Diggory
diggsey at googlemail.com
Mon Apr 22 05:54:31 PDT 2013
> you are doing it wrong. first you will need mingw32-make from
> mingw default setup, second fix win32 bindings makefile around
> line 25 so it will looks like this(supported file don't have
> uuid.di outdated interface file included)
Yeah I realise what I was doing wrong now. It only coincidentally
worked because the win32 libraries were linked in by default,
although of course the functions implemented in D gave errors.
I've switched to just adding missing functions as I need them to
"windows.d" and recompiling the druntime.
> Yes, pragma(lib, ...); but it won't work for .di files.
>
> http://d.puremagic.com/issues/show_bug.cgi?id=2776
>
OK, I had seen that but earlier in this thread evilrat said it
didn't work in GDC so I assumed it was a DMD only feature.
> also i would suggest you read all documents in language
> reference, how-tos, and sections, they are not so big but it
> will give answer to most begginers questions. also start
> reading library reference, you will save much time later.
I have read all the language reference pages, but there is very
little on linking and related things. Specifically, there could
be a more obvious link to "deimos" so that those bindings can be
found as that seems to be the most official place for such things
as well as more information on how to build the .d files. (For
example, the opengl project gives just a single .d file with no
information about how to use it)
As it turns out, the opengl project needs a .lib file to import
opengl32.dll which can only be generated by getting
"coffimplib.exe" (wow finding that was hard!) and running it on
the platform sdk import library for opengl.
Since wgl*** functions are declared in "windows.h" but are
defined in "opengl32.dll" this is technically part of the
platform SDK. It should really not be this hard to call a
function supposedly built into the operating system. An up to
date opengl32 import library should exist in "dmd2/windows/lib/".
I realise D is still fairly young so it's unreasonable to expect
everything to already exist, but at least enough information
should be given to be able to correctly add things that don't.
More information about the Digitalmars-d-learn
mailing list