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 (...)
The soliloquy is essentially all about life and death: "To be or not to be" means "To live or not to live" (or "To live or to die"). Hamlet discusses how painful and miserable human life is, and how death (specifically suicide) would be preferable, would it not be for the fearful uncertainty of what comes after death.
"To be, or not to be" is the opening phrase of a soliloquy given by Prince Hamlet in the so-called "nunnery scene" of William Shakespeare's play Hamlet, Act 3, Scene 1.
This quote from the play Hamlet, “To be, or not to be? That is the question—Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And, by opposing, end them?” The idea of whether is it better to live or to die.
It is Shakespeare's most performed play around the world — and, of course, one of the most-taught works of literature in high school and college classrooms. In fact, Hamlet's “To be or not to be” speech is the best-known soliloquy in the world.
This is because the Foundation
framework is already linked with libobjc
.
So on OSX, you'll need -lobjc
option only if you doesn't link with the Foundation
framework (which is very rare).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With