Mail Archives: djgpp/1995/11/19/03:02:56
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.
- Raw text -