Hi everybody !
I try to compile my program with AllegroFont 2.0.9 (last version) under Ubuntu 10.
But when I run my makefile (without forgot -lalfont param ) :
I have some errors alfer compiling (during the linking) :
/mnt/partage/log/font.cpp:20: undefined reference to `alfont_load_font'
/mnt/partage/log/font.cpp:21: undefined reference to `alfont_load_font'
/mnt/partage/log/font.cpp:22: undefined reference to `alfont_set_font_size'
/mnt/partage/log/font.cpp:23: undefined reference to `alfont_set_font_size'
/mnt/partage/log/font.cpp:20: undefined reference to `alfont_load_font'
/mnt/partage/log/font.cpp:21: undefined reference to `alfont_load_font'
/mnt/partage/log/font.cpp:22: undefined reference to `alfont_set_font_size'
/mnt/partage/log/font.cpp:23: undefined reference to `alfont_set_font_size'
log/font.o: In function `~t_data':
/mnt/partage/log/font.cpp:47: undefined reference to `alfont_destroy_font'
/mnt/partage/log/font.cpp:48: undefined reference to `alfont_destroy_font'
/mnt/partage/log/font.cpp:47: undefined reference to `alfont_destroy_font'
/mnt/partage/log/font.cpp:48: undefined reference to `alfont_destroy_font'
message.o: In function `t_message::_preparerTexte()':
/mnt/partage/message.cpp:75: undefined reference to `alfont_text_length'
message.o: In function `t_message::_affecterTexte()':
/mnt/partage/message.cpp:114: undefined reference to `alfont_textprintf_aa'
/mnt/partage/message.cpp:135: undefined reference to `alfont_textprintf_aa'
fonctions.o: In function `initialiserAllegro(int, int, int)':
/mnt/partage/fonctions.cpp:1096: undefined reference to `alfont_init'
main.o: In function `main':
/mnt/partage/main.cpp:787: undefined reference to `alfont_exit'
collect2: ld returned 1 exit status
Have you got any idea ?
Thanks
Isn't "./lib/libfmod-3.75.so" supposed to be "-lfmod-3.75" ?
[EDIT]
Oh, you had a subdirectory with it.
Yes, but there is no problem with fmod
Any ideas ?
Oh, you had a subdirectory with it.
Even then it should have been `-lfmod-3.75 -Llib`.
Any ideas ?
Try placing the libraries after the object files on the linker command line.
A cosmetic remark about your Makefile: use LIBS for the libraries you want to link to, use LDFLAGS for any other options you want to pass to the loader (debug/profile options, for instance). Don't export the variable (although I don't think it actually hurts).
It doesn't work
But I have found the solution, it was a probleme with the install of Alfont (what a dumb I am)
A cosmetic remark about your Makefile: use LIBS for the libraries you want to link to, use LDFLAGS for any other options you want to pass to the loader (debug/profile options, for instance). Don't export the variable (although I don't think it actually hurts).
Can you give me an example about what you say ? I'm not comfortable with Makefile...