Date: Thu, 21 May 1998 22:06:45 -0400 (EDT) Message-Id: <199805220206.WAA04602@delorie.com> From: DJ Delorie To: pbpetkov AT pathcom DOT com CC: djgpp AT delorie DOT com In-reply-to: <3564D712.8F5E4C4A@pathcom.com> (message from Plamen Petkov on Thu, 21 May 1998 21:38:26 -0400) Subject: Re: Linking with DJGPP Precedence: bulk > 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