Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
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.

Mar 24, 2009 3:03 PM in response to Sean McGuffee

That's not what I said. I was comparing static and dynamic libraries. You shouldn't be linking runtimes from gcc against code compiled with icc.

The fact icc produces more efficient code than gcc doesn't suprise me (and if it didn't icc would be a complete waste of money).

Why Intel doesn't provided both static and dynamic runtimes is beyond me.

I'm just telling you from experience 99.9% of folks don't link statically against language runtimes (even on Windows.)

Eric

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 ID.