Here is a useful tidbit that I didn’t know about OS X.
They don’t like you linking statically….
So, if you want to create a single executable without any depenencies, you cannot. This is a minor bummer, and not unsurprising. The Apple engineering group must really believe themselves to be super smart, so I expect this. This is why their dynamic linking is still stuck in the early 90’s.
Anyways, if you try to use ‘-static’ with gcc and get the cannot find ‘crt0.o’ in the error log, then this is why.
Apple > Developer Connection > Technical Q & A QA1118