# ld can't locate file for -lcrt0.o & GCC_EXEC_



## resglowing (Oct 30, 2001)

I'm trying to compile a C program. I'm getting some error from ld saying it can't find an object file crt0.o. 

$make IEEE-NaN 
cc -no-cpp-precomp -fno-common -arch ppc -static -D__macosx -D_BSD_TYPES TestNaN.c -lm -lgdbm -ldl 
/usr/bin/ld: can't locate file for: -lcrt0.o 
make: *** [IEEE-NaN] Error 1 

I've read in the cc man that "If GCC_EXEC_PREFIX is set, it specifies a prefix to use in the names of the 
subprograms executed by the compiler. No slash is added when this prefix 
is combined with the name of a subprogram, but you can specify a prefix 
that ends with a slash if you wish. 
If GNU CC cannot find the subprogram using the specified prefix, it tries 
looking in the usual places for the subprogram. 
The default value of GCC_EXEC_PREFIX is prefix/lib/gcc-lib/ where prefix is the 
value of prefix when you ran the configure script. 
Other prefixes specified with -B take precedence over this prefix. 
This prefix is also used for finding files such as crt0.o that are used for linking." 

However, I'm not sure how to use this. Can anyone suggest something. 

Thanks


----------

