Date: Sun, 19 Nov 1995 09:04:42 +0200 (IST) From: Eli Zaretskii To: Teng Yong Jeffrey <93602081 AT neptune DOT np DOT ac DOT sg> Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Question about using GPPCONIO On Fri, 17 Nov 1995, Teng Yong Jeffrey wrote: > I used "gcc line.c" to compile, and the errors appeared. > I tried "gcc -xc++ line.c", "gcc -lpc line.c", etc. The libraries should be put at the end of the command line, like this: gcc line.c -lpc or, better gcc -o line line.c -lpc (the former will create the file a.out, while the latter will write the program to a file named `line'). The linker which comes with DJGPP is a one-pass linker, that's why the order of the files on the command line is important; the libraries should be put there last. It's all explained in the FAQ list (available as faq102.zip from the same place you get DJGPP), section 8.10.