On Thursday, 6 October 2016 at 00:13:20 UTC, WhatMeWorry wrote:

Dub/Derelict is returning the following error at the D line:


    DerelictFT.load();  // Load the FreeType library


derelict.util.exception.SharedLibLoadException@C:\Users\kheaser\AppData\Roaming\dub\packages\derelict-util-2.0.6\source\derelict\util\exception.d(35):
 Failed to
 load one or more shared libraries:
        freetype.dll - The specified module could not be found.
libfreetype.dll - The specified module could not be found.
        libfreetype-6.dll - %1 is not a valid Win32 application.

What's up with the three DLLs?  Shouldn't just one suffice?

Some shared libraries can be found in the wild using different formats for the file names. In the cases where I'm aware of it, as in this one, I've implemented the loaders to attempt to load them all. If any one of them is present, the load will be successful. If not, they are all listed in the exception message.

And what's up with %1 ?

This is an error message from the operating system. The 'not a valid Win32 application' message usually arises when you try when you have an architecture mismatch between the shared library you are trying to load and your application. That is, one of them is 32-bit and the other 64-bit. My guess is you are compiling using the default DMD toolchain, which is 32-bit, but your FreeType DLL is 64-bit. Could that be your problem?



Reply via email to