KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
GCC manual says: file.m Objective-C source code. Note that you must link with the libobjc library yo make an Objective-C program work. And: -lobjc You need this special case of the -l option in order to link an Objective-C or Objective-C++ program. However, I can succesfully compile a program with simply: $ cc prg.m -framework Foundation Is it a linker default, when you include a framework? If so, where is it documented? The program gets linked anyway: $ otool -L a.out a.out: /System/Library/Frameworks/Foundation.framework/.../Foundation (...) /usr/lib/libSystem.B.dylib (...) --> /usr/lib/libobjc.A.dylib (...) /System/Library/Frameworks/CoreFoundation.f...k/.../CoreFoundation (...)
Tags (comma-separated)
Save Edits
Cancel