Search code examples
linker-errorsvisual-studio-2010allegro5

allegro 5 linker error


Can someone help me with Allegro 5.0.8 static linking in MSVC2010? allegro-5.0.8-monolith-static-mt.lib; -> this doesn't work for me. I can run the game from IDE but i can't release the solution. I have this at the top of my program:

#include <allegro5/allegro.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_native_dialog.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>

And this is pops out in my build output:

1>------ Build started: Project: igra2, Configuration: Release Win32 ------
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Load_Glyph
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Get_Kerning
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Get_Char_Index
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Done_Face
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Request_Size
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Set_Pixel_Sizes
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Attach_File
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Open_Face
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Done_FreeType
1>allegro_ttf-5.0.8-static-mt.lib(ttf.obj) : error LNK2001: unresolved external symbol _FT_Init_FreeType
1>C:\Users\Nikola\Documents\Visual Studio 2010\Projects\igra2\Release\igra2.exe : fatal error LNK1120: 10 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What else do I have to include? It seems that there is a problem with linking allegro_ttf.h. Is there somewhere a list of what to link for my includes?

P.S. If anyone else has an issue with building an allegro solution in MSVC10, this is what resolved most of my problems (except for this one): https://www.allegro.cc/forums/thread/611289


Solution

  • This functions are from FreeType library. So, you need to add the library into a linking stage.