After running into linker errors one time too many, I have come to the conclusion that I really need to understand how ld works, rather than just asking SO for black magic fixes everytime something doesn't work. I've found the Mac OS ld man pages which do provide some information, but as they say, they are intended for people who already understand ld. How can one gain that understanding?
Part of the problem is that there are different flavors of ld -- unix and gcc at a minimum -- and does clang have its own flavor? So I'm not sure what docs apply.
Here's a great tutorial about linkers:
Beginner's Guide to Linkers
It's very technical stuff, of course, but very well explained. I don't think you still will see «black magic», as you say, after reading it.
Here is another article that is more specific to Xcode and Mac OS X: https://gist.github.com/loderunner/b6846dd82967ac048439
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