Thread overview
failed loading freetype 2.6 via derelict-ft
5 days ago
Spacen
5 days ago
Igor
5 days ago
Mike Parker
5 days ago
Mike Parker
4 days ago
Mike Parker
3 days ago
Spacen
3 days ago
Mike Parker
5 days ago
Hello,

I am trying to resurect an old project, but can't get the freetype library loaded. I can't figgure out what to do it's been a while. I have just built the freetype 2.6 library with visual studio 2015. Any tips would be appreciated.

>dub build
Performing "debug" build using dmd for x86.
derelict-util 2.0.6: target for configuration "library" is up to date.
derelict-ft 1.1.3: building configuration "library"...
derelict-gl3 1.0.23: target for configuration "library" is up to date.
derelict-sdl2 1.9.7: target for configuration "library" is up to date.
gltest ~master: building configuration "application"...
Linking...
To force a rebuild of up-to-date targets, run again with --force.

C:\>gltest.exe
Exception: Failed to load symbol FT_Stream_OpenBzip2 from shared library freetype.dll
5 days ago
On Wednesday, 13 September 2017 at 19:01:52 UTC, Spacen wrote:
> Hello,
>
> I am trying to resurect an old project, but can't get the freetype library loaded. I can't figgure out what to do it's been a while. I have just built the freetype 2.6 library with visual studio 2015. Any tips would be appreciated.
>
>>dub build
> Performing "debug" build using dmd for x86.
> derelict-util 2.0.6: target for configuration "library" is up to date.
> derelict-ft 1.1.3: building configuration "library"...
> derelict-gl3 1.0.23: target for configuration "library" is up to date.
> derelict-sdl2 1.9.7: target for configuration "library" is up to date.
> gltest ~master: building configuration "application"...
> Linking...
> To force a rebuild of up-to-date targets, run again with --force.
>
> C:\>gltest.exe
> Exception: Failed to load symbol FT_Stream_OpenBzip2 from shared library freetype.dll

Make sure dll is also 32bit if you are building 32bit app and your Visual Studio should have dumpbin utility which you can use to make sure the required symbols are properly exported:

dumpbin /EXPORTS your.dll
5 days ago
On Wednesday, 13 September 2017 at 19:01:52 UTC, Spacen wrote:
> Hello,
>
> I am trying to resurect an old project, but can't get the freetype library loaded. I can't figgure out what to do it's been a while. I have just built the freetype 2.6 library with visual studio 2015. Any tips would be appreciated.
>
>>dub build
> Performing "debug" build using dmd for x86.
> derelict-util 2.0.6: target for configuration "library" is up to date.
> derelict-ft 1.1.3: building configuration "library"...
> derelict-gl3 1.0.23: target for configuration "library" is up to date.
> derelict-sdl2 1.9.7: target for configuration "library" is up to date.
> gltest ~master: building configuration "application"...
> Linking...
> To force a rebuild of up-to-date targets, run again with --force.
>
> C:\>gltest.exe
> Exception: Failed to load symbol FT_Stream_OpenBzip2 from shared library

Missing symbols usually mean a version mismatch. The latest DerelictFT requires FreeType 2.6 or later. It could also mean your shared library was compiled without bzip2 support. I'm on my phone right now else I'd check it myself, but if your library os up to date you can use derelict's selective loading mechanism to ignore missing symbols you don't need.

http://derelictorg.github.io/loading/failure/
5 days ago
On Wednesday, 13 September 2017 at 20:16:23 UTC, Igor wrote:
> Make sure dll is also 32bit if you are building 32bit app and your Visual Studio should have dumpbin utility which you can use to make sure the required symbols are properly exported:
>
> dumpbin /EXPORTS your.dll

In that case, he'd have seen a SharedLibLoadException rather than a SymbolLoadException, and the error message would be something like "foo.dll is not a valid Windows DLL" or some such.
4 days ago
On Wednesday, 13 September 2017 at 22:18:07 UTC, Mike Parker wrote:

>
> Missing symbols usually mean a version mismatch. The latest DerelictFT requires FreeType 2.6 or later. It could also mean your shared library was compiled without bzip2 support. I'm on my phone right now else I'd check it myself, but if your library os up to date you can use derelict's selective loading mechanism to ignore missing symbols you don't need.
>
> http://derelictorg.github.io/loading/failure/

Digging through the FreeType changelogs, I think it likely that it's a configuration issue -- your copy of the freetype shared library was compiled without bzip2 support.
3 days ago
On Friday, 15 September 2017 at 05:16:55 UTC, Mike Parker wrote:
> On Wednesday, 13 September 2017 at 22:18:07 UTC, Mike Parker wrote:
>
>>
>> Missing symbols usually mean a version mismatch. The latest DerelictFT requires FreeType 2.6 or later. It could also mean your shared library was compiled without bzip2 support. I'm on my phone right now else I'd check it myself, but if your library os up to date you can use derelict's selective loading mechanism to ignore missing symbols you don't need.
>>
>> http://derelictorg.github.io/loading/failure/
>
> Digging through the FreeType changelogs, I think it likely that it's a configuration issue -- your copy of the freetype shared library was compiled without bzip2 support.

Thanks for the reply that is exactly it. I downloaded several dlls from the internet, and then decided to build it myself. I see there is a bzip configuration option but I'll need to read the documentation and presumably bzip gets linked into the dll.

I managed to get the application running by ignoring these missing functions:

       if(
                symbolName == "FT_Stream_OpenBzip2" ||
                symbolName == "FT_Get_CID_Registry_Ordering_Supplement" ||
                symbolName == "FT_Get_CID_Is_Internally_CID_Keyed" ||
                symbolName == "FT_Get_CID_From_Glyph_Index"
            ) {

I imagine there will be a crash if they actually get called.


3 days ago
On Friday, 15 September 2017 at 16:04:52 UTC, Spacen wrote:

> Thanks for the reply that is exactly it. I downloaded several dlls from the internet, and then decided to build it myself. I see there is a bzip configuration option but I'll need to read the documentation and presumably bzip gets linked into the dll.
>
> I managed to get the application running by ignoring these missing functions:
>
>        if(
>                 symbolName == "FT_Stream_OpenBzip2" ||
>                 symbolName == "FT_Get_CID_Registry_Ordering_Supplement" ||
>                 symbolName == "FT_Get_CID_Is_Internally_CID_Keyed" ||
>                 symbolName == "FT_Get_CID_From_Glyph_Index"
>             ) {
>
> I imagine there will be a crash if they actually get called.

If you call them, yes. Or if you link with any third-party D libraries that call them with the expectation that you've loaded them (but I don't know of any such thing).