Compiling openttd with VS2005 - linker errors in freetype

Ok, here's a nice obscure one. I am trying to compile the latest open source transport tycoon in Visual Studio 2005 (This is a C ++ application that uses zlib, dx8, and a few other fairly common libraries).

I am getting several linker errors for freetype dependencies:

Error   1   error LNK2001: unresolved external symbol @FT_Done_Face@4   fontcache.obj   
Error   2   error LNK2001: unresolved external symbol @FT_Load_Char@12  fontcache.obj   
Error   3   error LNK2001: unresolved external symbol @FT_Init_FreeType@4   fontcache.obj   
Error   4   error LNK2001: unresolved external symbol @FT_Select_Charmap@8  fontcache.obj   
Error   5   error LNK2001: unresolved external symbol @FT_Set_Charmap@8 fontcache.obj   
Error   6   error LNK2001: unresolved external symbol @FT_New_Face@16   fontcache.obj   
Error   7   error LNK2001: unresolved external symbol @FT_Render_Glyph@8    fontcache.obj   
Error   8   error LNK2001: unresolved external symbol @FT_Set_Pixel_Sizes@12    fontcache.obj   
Error   9   fatal error LNK1120: 8 unresolved externals ..\objs\Win32\Release\\openttd.exe  

      

I downloaded the latest stable freetype status and compiled it (also in VS2005) and also included the ft2build.h and freetype directories in the VS8 / VC / include directory and put the libfreetype2.lib compiled into my VS8 / VC / lib directory. What can I lose?

Thank!

+1


source to share


1 answer


The sign @

at the beginning of the function name indicates that your file fontcache.obj

expects these functions to have a calling convention __fastcall

, which is unusual since the default calling convention __cdecl

. I suspect there is an incorrect location somewhere in the compiler settings used to build libraries and those used to build the application. See here and here for more information.



+1


source







All Articles