| Summary: | sdl2_ttf.dll Looks for missing InterlockedCompareExchange in libfreetype6.dll | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | moiein2000 |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | 2.0.13 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
Yes, the next release will use a new version of mingw-w64 |
Hi, We have run into a dll loading issue, which I believe is due to the usage of an older version of mingw-w64 used to build sdl2_ttf.dll. At least that's what it seemed to me. Using objdump on sdl2_ttf.dll I get the following: sdl2_ttf.dll: file format pei-i386 Characteristics 0x230e executable line numbers stripped symbols stripped 32 bit words debugging information removed DLL ... There is an import table in .idata at 0x7100f000 The Import Tables (interpreted .idata section contents) vma: Hint Time Forward DLL First Table Stamp Chain Name Thunk 0000f000 0000f064 00000000 00000000 0000f900 0000f1c4 DLL Name: libfreetype-6.dll vma: Hint/Ord Member-Name Bound-To f324 34 FT_Done_Face f334 35 FT_Done_FreeType f348 36 FT_Done_Glyph f358 58 FT_Get_Char_Index f36c 63 FT_Get_Glyph f37c 65 FT_Get_Kerning f390 103 FT_Glyph_Stroke f3a4 105 FT_Glyph_To_Bitmap f3bc 109 FT_Init_FreeType f3d0 121 FT_Load_Glyph f3e0 140 FT_Open_Face f3f0 158 FT_Outline_Transform f408 168 FT_Render_Glyph f41c 176 FT_Set_Char_Size f430 177 FT_Set_Charmap f444 181 FT_Set_Pixel_Sizes f45c 223 FT_Stroker_Done f470 230 FT_Stroker_New f484 233 FT_Stroker_Set f498 246 InterlockedCompareExchange@12 The key point is that it's looking for InterlockedCompareExchange in libfreetype-6.dll. This is due to a bug in mingw-w64 that was fixed a long time ago: http://sourceforge.net/p/mingw-w64/mailman/message/30894964/. Normally it's not a problem because you also distribute libfreetype-6.dll which exports it since it was built with the same version. The problem is when the system already has loaded a different, later version of libfreetype-6.dll, which has fixed this issue and doesn't export InterlockedCompareExchange. In that case the sdl2_ttf dll fails to be loaded. Is it possible to distribute sdl2_ttf.dll using later version of mingw-w64?