Anybody use Derelict FreeType recently (successfully)

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 17 15:22:21 PDT 2015


On Thursday, 17 September 2015 at 05:27:08 UTC, Mike Parker wrote:
> On Thursday, 17 September 2015 at 04:58:05 UTC, WhatMeWorry 
> wrote:
>>
>> Compiling and linking was error free, but when I hit
>>
>> DerelictFT.load();
>>
>> my program aborts with the following run time message:
>>
>> derelict.util.exception.SymbolLoadException at source\derelict\util\exception.d(35): Failed to load symbol FT_Reference_Face from shared library freetype.dll
>
> This function was added to FreeType in version 2.4.2, so you 
> will see this error when trying to load an older version.
>
>>
>> First of all, I'm not sure if I have a valid freetype.dll 
>> file. How does one tell?  I downloaded freetype-2.6 but 
>> couldn't find anything there.  I downloaded freetype-2.3.5 and 
>> found a freetype6.dll which I renamed to freetype.dll because 
>> that was want an online discussion said.
>
> DerelictFT currently requires FreeType 2.5 or later (though 
> I've not yet looked into updating to the 2.6 API). What problem 
> did you have with the 2.6 binary you downloaded?
>
> Using the 2.3.5 and 2.4.2 binaries is bound to result in 
> SymbolLoadExceptions, as any functions added in 2.5 will not be 
> present in those binaries. You can work around this by building 
> your own if you can't find anything precompiled online, but if 
> you aren't using any 2.5 features, I would suggest you look 
> into using DerelictUtil's selective symbol loading 
> mechanism[1]. You'll need to decide a minimum version of 
> FreeType to support, then diff the headers from that version 
> with later releases to see which functions were added in later 
> versions. Check for those functions in a MissingSymbolCallback 
> and you can load without any SymbolLoadExceptions.
>
> Also, an alternative to renaming the DLL is to pass the name 
> directly to the loader:
>
> Version(Windows) DerelictFT.load("freetype6.dll");
> else DerelictFT.load();
>
> [1] http://derelictorg.github.io/using/fail.html

Ok. I could not find a pre-compiled freetype.dll so I downloaded 
Freetype 2.5.5 and built it anew with a new install of Visual 
Studio 2015.

But now I'm getting a run time error saying: 
derelict.util.exception.SymbolLoadException 
@source\derelict\util\exception.d(35): Failed to load symbol 
FT_Init_FreeType from shared library freetype.dll

After hours of reading existing freetype/derelict documents, I'm 
stuck again.
Any suggestions. Thanks.




More information about the Digitalmars-d-learn mailing list