Mail Archives: djgpp/1998/05/21/22:06:48
> ld -Ld:/djgpp/allegro/lib/djgpp/ -lliballeg -oex1.exe ex1.o
First off, don't use ld. Use gcc. It adds extra stuff that you need
(use gcc -v ... to see an example)
gcc -Ld:/djgpp/allegro/lib/djgpp/ -lliballeg -oex1.exe ex1.o
Next, list your objects *before* libraries (order matters!):
gcc ex1.o -Ld:/djgpp/allegro/lib/djgpp/ -lliballeg -oex1.exe
Next, if the file is liballeg.a, use -lalleg:
gcc ex1.o -Ld:/djgpp/allegro/lib/djgpp/ -lalleg -oex1.exe
You might want to move liballeg.a into d:/djgpp/lib so that you can
omit the -L option:
gcc ex1.o -lalleg -oex1.exe
Also, put a space between the -o and the ex1.exe (it might work either
way, but the space is a safer habit):
gcc ex1.o -lalleg -o ex1.exe
- Raw text -