Mail Archives: djgpp/2000/04/07/14:59:48
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 -