ld: library not found for -lcrt0.o

Hi, I'm doing research at Memorial Sloan-Kettering Cancer Center, and I am trying to compile some c code with an intel compiler and a -static flag. I'm getting an error:
ld: library not found for -lcrt0.o
Does anyone know how to fix this?
Thanks, it's holding up my research!
Sean

iMac 24 inch, Mac OS X (10.5.5)

Posted on Mar 18, 2009 10:34 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 18, 2009 3:01 PM

crt0.o looks like the startup module, which is system dependent. In other words you are trying to port your program from one system to another, and the target system probably uses a different startup module.

Your first try is to remove -lcrt0.o from the build command line and let the system link to its default startup code. However be aware that porting code is not usually a job for a beginner, and the absence of crt0.o may be only the start of the problems you'll need to solve.
23 replies

Mar 24, 2009 9:27 AM in response to ericmeyers

Well, I don't see how it could be as efficient as possible if it is using some code that was compiled with gcc instead of icc. I mean, I notice at least a 3 fold increase in speed by compiling with icc. Why should the libraries my program links with be compiled with gcc instead of icc? Maybe they aren't used much, but in principle, it makes sense to let them be compiled by icc.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ld: library not found for -lcrt0.o

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.