Posts

Xcode: Easy Shared & Static Lib Management and Linking

Image
In Xcode, you can add existing frameworks (binary shared/static libraries or Apple's packaged framework) to a target in your project by choosing from the framework list or drag'n'drop from Finder. Several libraries under "Frameworks" group (e.g. libBusted.a) Benefit of doing this is obvious: you can manage and see what libraries your program is linked to. However, after doing that, I noticed one thing. Xcode does not link shared/static libraries in a simple way like: gcc -o qux libfoo.dylib libbar.a buz.o Instead, when libraries are going to be added, Xcode obtains paths to the directories containing these libraries, and appends these to the build setting "Library Search Path" of the target. So that the actual linking looks like: gcc -L/path/to/foobar -o qux -lfoo libbar.a buz.o Compared to the former, even though orthodox, linking in the latter is indirect. I like the former method because it's simple and error-free even though it somewh...

Transition Mayhem: Xcode 4 (and Symbol Visibility Side Note)

P.S. To guys here for " illegal text reloc to vtabl e" or " bad codegen " of Xcode 4 If you enrolled one of Apple Developer Programs, preferably Mac Developer Program, you should visit the exclusive web forum at Apple Developer Connection ( http://developer.apple.com/devforums/ ). I found a thread where one of OGRE library developers mentioning he found info about this "illegal text reloc to vtable" or "bad codegen" things at that forum. Something like Apple tightened up their policy on how to resolve symbols in Xcode 4. Unfortunately, I didn't enroll any of Apple Developer Programs, and don't know the detail. I like Xcode because this is the first IDE I got used to, but I don't like Xcode 4 not working as I want. Let me cut to the point, I have a problem compiling my project in Xcode 4. Compiling goes well in Xcode 3, but in Xcode 4, illegal text reloc to vtable or bad codegen things comes up to slap the back of my head e...

A Post

It's good to keep a diary, people in general are forgetful, including me. "Blog" is the shortened form of "web log", as the name has it, I'll keep a log of my daily happenings. Anyway, I found programming to my liking, so I'm going to post some self-indulgent mumbo-jumbo about C/C++ - occasionally other languages perhaps? - to this innocent, untouched blog. Ooops! Now I touched that! It's no longer innocent. So, this is how things start, right?