Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

statically linking



What is the proceedure for trying to statically link binaries?
Normally, one would just pass -static to cc, and poof, out
pops a statically linked binary.
However, when doing this, I get:
/usr/bin/ld: foo.o incompatible, file contains unsupported type of section 3 (__TEXT,__picsymbol_stub) in load command 0 (must specify "-dynamic" to be used)

For what it's worth, here's the code snippit I tried:
int main()
{
printf("foobar\n");
}

cc -c foo.o foo.c
cc -static -o foo foo.o

Is there something I'm missing?

Thanks,
Rob




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.