www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/19/03:02:56

Date: Sun, 19 Nov 1995 09:04:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019