[X-Unix] Compiling static binaries with GCC fails?

Brian Medley bpm-list-osx-unix at 4321.tv
Mon Sep 11 21:25:33 PDT 2006


On Mon, Sep 11, 2006 at 10:37:52AM -0400, Alexandre Gauthier wrote:

> ...
> So, here I am, trying to compile a static binary on OS X 10.4 Tiger, x86
> (MacBook pro).
> 
> So I just invoke gcc with the -static option.
> 
>   $ gcc -static -o program program.c
> 
> The program seems to compile fine, but then, linking fails.
> 
>   /usr/bin/ld: can't locate file for: -lcrt0.o
>   collect2: ld returned 1 exit status
> ...

http://developer.apple.com/qa/qa2001/qa1118.html

-- 
~`^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-., \|/  (___)  \|/ _,.-=~'`^`
                                      @~./'O o`\.~@
      "Knowledge is Power"           /__( \___/ )__\  *PPPFFBT!*
         -- Francis Bacon               `\__`U_/'
 _.-=~'``'~=-._.-=~'``'~=-._.-=~'`^`'~= <____|'  ^^`'~=-.,__,.-=
~'^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-.,__,.-==--^'~=-.,__,.-=~'`^`


More information about the X-Unix mailing list