Can someone explain how glfw3.dll gets created?
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Oct 14 01:49:19 PDT 2014
On 10/14/2014 5:21 AM, WhatMeWorry wrote:
> I have a simple GLFW3 program running in Visual D integrated shell, that
> kept aborting at DerelictFLFW3.load() with a "failed to load the shared
> libraries: glfw3.dll.'
>
> So I found a glfw3.dll somewhere and moved it into the project folder (I
> know this is bad technique) and that fixed the problem.
>
> But now I'm wondering were this glfw3.dll came from.
>
>
Others have already answered your specific question, but I would just
like to point out that their answers are generally true for any Derelict
package you use. Derelict binds to C libraries, or C++ libraries with C
interfaces, so that they are usable from D. When you add Derelict to
your dub configuration, or in your Visual D build settings, all you are
getting are the D files allow you to interface with the C libraries --
you are not getting the C libraries themselves. On Windows, in most
cases you have to go out and either download a prebuilt binary or
download and compile the C source yourself. I say /most cases/ because
OpenGL will already be on your system as part of your graphics driver
and you may already have another library or two installed in your system
directories (like OpenAL, perhaps).
Furthermore, Derelict is a /dynamic/ binding in that it loads the shared
libraries at runtime and has absolutely no compile time dependency on
any of them. This is why you have to call DerelictFoo.load(). That looks
for the library on the system path and, if found, loads it into memory
so that you can start calling into it.
So if you are going to use GLFW, SDL, or anything else, you need to go
to that project's web site and use their documentation to understand how
to build (if they don't provide binaries) and use those libraries, then
make sure that the compiled DLLs are on the system path (meaning,
usually, in the executable's directory).
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
More information about the Digitalmars-d-learn
mailing list