Does DUB create .dll files?
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 17 04:11:44 PDT 2016
On Tuesday, 17 May 2016 at 05:30:33 UTC, WhatMeWorry wrote:
>
> I just incorporated DerelictALURE into a project and it
> compiled and linked fine, but when I ran the executable, it
> aborted with:
>
> derelict.util.exception.SharedLibLoadException at N:\DUB_Packages\DerelictOrg\DerelictUtil\source\derelict\util\exception.d(35):
> Failed to load one or more sharedlibraries:
> ALURE32.dll - The specified module could not be found.
>
> So I went back to DerelictOrg\derelict-alure-master\lib and I
> see a DerelictALURE.lib file that was created, but nothing else.
>
> Am I supposed to get ALURE32.DLL from somewhere outside of DUB,
> or did I miss a step or command when I built
> derelict-alure-master?
>
> thanks.
The Derelict packages all provide *bindings* to C libraries, not
the shared libraries they bind to. You link statically with
DerelictFoo.lib, which is what happens automatically when you use
dub to manage your project and provide derelict-foo as a
dependency, then load libfoo.dll/so/dylib dynamically at runtime
with DerelictFoo.load. In order for this to work, the libfoo
shared library must be somewhere on the system path. For Windows,
you generally want to keep it in the same directory as your
executable. It's up to you to obtain the C shared library, either
through downloading a prebuilt binary or getting the C source and
building it yourself
In your specific case, ALURE is available at [1]. A precompiled
Windows binary is provided for download at the bottom of that
page.
[1] http://kcat.strangesoft.net/alure.html
More information about the Digitalmars-d-learn
mailing list