-1

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

nix_kc
  • 11
  • 3
  • P.P.S. This is in my Release -> Linker/Input/Additional Dependencies: ;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;opengl32.lib;gdiplus.lib;psapi.lib;shlwapi.lib;allegro-5.0.8-static-mt.lib;allegro_image-5.0.8-static-mt.lib;allegro_primitives-5.0.8-static-mt.lib;allegro_font-5.0.8-static-mt.lib;allegro_ttf-5.0.8-static-mt.lib;allegro_dialog-5.0.8-static-mt.lib;%(AdditionalDependencies) – nix_kc May 23 '13 at 14:09

1 Answers1

1

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

qehgt
  • 2,972
  • 1
  • 22
  • 36
  • Now my program succesfully builds and runs inside IDE, but executable in the Release folder crashes upon start. I included freetype-2.4.8-static-mt.lib and some other stuff after that. EDIT: Is order of linking important? – nix_kc May 23 '13 at 14:26
  • @nix_Croatia Link order is important for single-pass linkers (`gcc` for example). – qehgt May 23 '13 at 14:42
  • It works. I just needed to place my resources in same folder as the exe file. – nix_kc May 23 '13 at 20:19
  • @nix_Croatia, you may want to take a look at [this wiki page](http://wiki.allegro.cc/index.php?title=Loading_Resources_(Troubleshooting)#Fix_the_Path) on how to properly handle loading resources. – Matthew May 24 '13 at 17:20