|
Algif, or any gif library for that matter |
Mark Oates
Member #1,146
March 2001
|
I'm wanting to use gif formats for my game because the bmp files are beginning to take up a lot of space. I downloaded algif and it appears that I was able to compile the library correctly. These are the steps I took. gcc -v algif.c created the o file (about 3KB) ar -rcs libalgif.a algif.o created libalgif.a (also about 3KB) I then copied the libalgif.a file into the compiler's lib folder, copied algif.h to the include folder, and added -libalgif to the linker thing (using dev-cpp). using the code #include "allegro.h" #include "algif.h" void main() { allegro_init(); algif_init(); allegro_message("hey"); }END_OF_MAIN();
I get the error: I tried this with 2 other libraries and had similar issues. I also wanted to do a forum search, but it's not there anymore. -- |
Matthew Leverton
Supreme Loser
January 1999
|
That would be: -lalgif for gcc. |
Mark Oates
Member #1,146
March 2001
|
-lalleg -lalgif gives me these errors:
if I switch the order to -lalgif -lalleg c:\documents and settings\mark\desktop\thing2\main.o(.text+0x35):main.cpp: undefined reference to `algif_init' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x11):algif.c: undefined reference to `algif_load_raw_animation' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x101):algif.c: undefined reference to `algif_render_frame' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x164):algif.c: undefined reference to `algif_destroy_raw_animation' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x190):algif.c: undefined reference to `algif_load_raw_animation' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x394):algif.c: undefined reference to `algif_render_frame' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x3ad):algif.c: undefined reference to `algif_destroy_raw_animation' C:\Dev-Cpp\Lib/libalgif.a(algif.o.b)(.text+0x5bf):algif.c: undefined reference to `algif_save_raw_animation'
-- |
Matthew Leverton
Supreme Loser
January 1999
|
If that's really a .a file full of .o's, then you include it in the project (like a .c file) without linking to it. |
Mark Oates
Member #1,146
March 2001
|
ah, I misread the manual! manual said:
gcc -c *.c
I interperetd this as so when you said "a .a file full of .o's" I caught the idea that there were multiple files at work here... since I really have no idea what's going on with libs, linking, .o, .a, makefiles, and all that. It's working now, thanks alot! By the way, is it possible to get the forum search back? I can't find forum topics as easily with google. -- |
SonShadowCat
Member #1,548
September 2001
|
It's still there if you use the search lin on the main page. Theres a link at the top of the search to use the original search. |
Mark Oates
Member #1,146
March 2001
|
that one's gone too. links to www.allegro.cc/forums/search/googlepwnage -- |
|