[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiler error: C compiler cannot create executables



Lo, on Saturday, January 18, Eric G. Miller did write:

> On Sat, Jan 18, 2003 at 12:07:24PM +0100, Achton N. Netherclift wrote:
> [snip]
> > According to packages.debian.org, the file that is missing according to
> > the config.logs (crt1.o) is contained in the libc6-dev package. The file is
> > missing on my system, so I attempt to install it:
> 
> AFAIK crt1.o would be a temporary file created from the combination of
> "conftest.c" and some gcc parts when compiling the C file directly to
> an executable.  Your installation is incomplete because you don't have
> libc6-dev installed.  All that stuff about gcc not being able to produce
> an executable...  GCC needs some of the things provided by libc6-dev.

About half-right:

[nanny-ogg:~]$ locate crt1.o
/usr/lib/crt1.o
/usr/lib/gcrt1.o
/usr/lib/Mcrt1.o
[nanny-ogg:~]$ dpkg -S /usr/lib/crt1.o
libc6-dev: /usr/lib/crt1.o

crt1.o is, I think, an object file containing a big chunk of the C/C++
runtime.  In particular, it contains the startup code that does a bunch
of initialization, then calls main().  After main() returns, it does a
bunch of OS-specific cleanup, like taking main's return code and putting
in the place where the OS expects to find the process's exit code.  It's
essentially part of the compiler/library infrastructure.



Reply to: