delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/22/15:11:43

Message-Id: <m0xk8WB-000S26C@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Vic <tudor AT cam DOT org>, djgpp AT delorie DOT com
Date: Mon, 22 Dec 1997 17:13:00 +0000
MIME-Version: 1.0
Subject: Re: weird GCC invoking: BUG?
In-reply-to: <349E8B3C.1D20@cam.org>

Vic <tudor AT cam DOT org> wrote:

> If I say gcc, it will give me a "no imput files" error.
> But If I say "gcc -lsomething" it will say "crt0.s: undefined references
> to main". Why?? I'm still not providing any sources...
> Is it because a lib file is just an archive of objects, which may
> contain a main function?
Yes, a library can contain a .o with main and as ld for djgpp is configured to 
link ctr0 with anything you provide ld tries to solve the references in ctr0 
and main is just one reference like others. 
You must take in count that ld isn't a C linker, is a linker and nothing more. 

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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