Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Alfont linker error

This thread is locked; no one can reply to it. rss feed Print
Alfont linker error
New Element
Member #8,198
January 2007

Hi folks ^^
I have quite a bothering problem with Alfont 1.9.2.
When I use Allegro (4.2) as a dynamic library with alfont, everything works ok and my game runs no problem, same thing when I use Allegro as a static library whithout alfont.
But as soon as I use allegro as a static library with alfont, i get a linker error :
[Linker error] Undefined reference to `_imp__ugetxc'
which is repeated many, many times...

So I decided to create a test program :
#define ALLEGRO_STATICLINK
#include <alfont.h>
#include <allegro.h>

int main ()
{
set_uformat(U_ASCII);
allegro_init();
alfont_init();

install_keyboard();
install_mouse();

alfont_exit();

return 0;
}END_OF_MAIN()

But i still get the same error.

I have tried to make alfont static by modifying the makefile (uncommenting the #TARGET=MINGW32_DLL) but the error still persists.

INFO :
These are the commands I added to the compiler options, but I don't think the error comes from here.
-lalfont -lalleg_s -lgdi32 -lwinmm -lole32 -ldxguid -ldinput -lddraw -ldsound

Thanks for your help !
I will be out of touch from my computer tomorrow and will only be able to come on every Saturday, so don't think I've disappeared ^^

Milan Mimica
Member #3,877
September 2003
avatar

I'm using allegro and alfont, both statically linked, with static CRT. This is the alleg_s_crt.lib file. When building alfont select statically linked runtime threading model in project options. Hope it helps.

New Element
Member #8,198
January 2007

Ok so good news, the game runs on my pc.
Problem was that i didnt actually create a project ^^'
What i did was go into project options -> parameters and add the librairies "libalfont.a" and "liballeg.a" in this order (if not in that order it doesn't work, always put alfont before allegro ;) ).

But the game does not work on other people's computers : a message error comes up saying "Could not find alleg42.dll" so I suppose that the library is still dynamic ...
Could you inform me about alleg_s_crt.lib and static CRT please? I've never heard of it before ^^' ;D

EDIT : Sorry, I forgot to say that I use DevCpp 4.9.9.2 !

Go to: