|
Makefile and AllegroFont |
zelda007
Member #12,303
October 2010
|
Hi everybody ! I try to compile my program with AllegroFont 2.0.9 (last version) under Ubuntu 10. 1[...]
2export LDFLAGS += -lalfont `allegro-config --libs` ./lib/libfmod-3.75.so
3
4EXEC = Zeldaa
5OBJECTS = main.o
6
7%.o: %.cpp *.hpp
8 @echo "\033[34m$(CXX) $< -> $@\033[0m";\
9 $(CXX) $(CXXFLAGS) -c $< -o $@
10
11%.o: %.cpp *.h
12 @echo "$(CXX) $< -> $@\033[0m";\
13 $(CXX) $(CXXFLAGS) -c $< -o $@
14
15%.o: %.c *.h
16 @echo "$(CC) $< -> $@\033[0m";\
17 $(CC) $(CFLAGS) -c $< -o $@
18
19$(EXEC): $(OBJECTS)
20 @echo "\033[32m$(LD) ($(OBJECTS)) -> $(EXEC)\033[0m";\
21 $(LD) $(LDFLAGS) $(OBJECTS) -o $@
22
23[...]
I have some errors alfer compiling (during the linking) : Quote:
/mnt/partage/log/font.cpp:20: undefined reference to `alfont_load_font' Have you got any idea ? Thanks |
Arthur Kalliokoski
Second in Command
February 2005
|
Isn't "./lib/libfmod-3.75.so" supposed to be "-lfmod-3.75" ? [EDIT] Oh, you had a subdirectory with it. They all watch too much MSNBC... they get ideas. |
zelda007
Member #12,303
October 2010
|
Yes, but there is no problem with fmod |
Evert
Member #794
November 2000
|
Arthur Kalliokoski said: Oh, you had a subdirectory with it. Even then it should have been `-lfmod-3.75 -Llib`. zelda007 said: 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). |
zelda007
Member #12,303
October 2010
|
It doesn't work But I have found the solution, it was a probleme with the install of Alfont (what a dumb I am) Evert said: 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... |
|