delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/07/14:59:48

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Linking in .a files from within RHIDE
Date: 7 Apr 2000 14:19:18 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 42
Message-ID: <8ckqp6$c5l$1@nets3.rz.RWTH-Aachen.DE>
References: <8ciba7$ttq$1 AT plato DOT wadham DOT ox DOT ac DOT uk> <38ECD3B0 DOT FE8403F8 AT hotmail DOT com> <8ckdam$343$1 AT plato DOT wadham DOT ox DOT ac DOT uk>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 955117158 12469 137.226.32.75 (7 Apr 2000 14:19:18 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 7 Apr 2000 14:19:18 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

J-P <jstacey AT plato DOT wadham DOT ox DOT ac DOT uk> wrote:
> In article <38ECD3B0 DOT FE8403F8 AT hotmail DOT com>,
> Andrew Hakman  <hakmana AT hotmail DOT com> wrote:
>>When linking a .a file using RHIDE, if the file has lib???.a, go to
>>OPTIONS->Libraries, type the name but chop the "lib" and ".a" parts off, then
>>click the checkbox beside it's name. It should now link in properly.
>>Example: to include libemu.a   type    emu    and check the box to the left of
>>it.

> Thanks. Works like a charm. Out of interest, is there any way of stopping
> both gcc via RHIDE and command-line gcc from including all the POSIX stuff
> and thus speeding up compile time?

You can use the '-ansi' flag. It will disable exactly those parts of
the headers that are not ANSI C (i.e. POSIX, but also all(!) the
typical PC-specific functions). The libc will still be checked in
full, of course.

Wether or not that speeds up compile or link time is a totally
different issue. I strongly doubt it will.

> OPTIONS\LIBRARIES that says "include default libraries." Can I happily run
> a non-POSIX program by removing libc.a linking? 

No. You're misunderstanding what POSIX is, it seems. POSIX is a
standardized set of functions originally defined for Unix-type
platforms. Sort of a minimal standard libc for Unix.

Removing libc altogether will break even programs that don't use any
of the functions defined only by POSIX. 'printf()' is also in libc,
see?

> It's again me trying to convince my supervisor to move from Turbo
> C... :) His main complaint at the moment is compile time.

A rather stupid complaint that is, IMHO. Answer that the resulting
programs are a whole lot faster, as a bargain for the longer
compilation times. Or compile with optimization switched off.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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