In my iPhone development I encountered link errors along the lines of:
"___restore_vfp_d8_d15_regs", referenced from:
-[Blah blah:] in blah.o"___save_vfp_d8_d15_regs", referenced from:-[Blah blah:] in blah.o
Google had a little to say about it. Unfortunately, it all appeared wrong.
The issue was a subtle one. The application's "Library search paths" (LIBRARY_SEARCH_PATHS) variable has some historic cruft in it which caused the linker to pull in and old incompatible version of libstdc++, with a consequence of much hilarity and hair-pulling.
When I removed "$(SDKROOT)/usr/lib/gcc/arm-apple-darwin9/4.0.1" from the list (not sure where this had come from) the application magically linked one more, and kittens and puppies danced with my iPhone once more.
6 comments:
Thanks for posting this - saved me a lot of frustration!
well, another reason will cause this problem, if your target device is iPad/iPhone compatiable, the "archeitecures" in project setting might be "Optimized armv6 armv7", took me hours to figure out, I changed it to "standard armv6", works for iPhone. reference: http://opensource.apple.com/source/gcc/gcc-5646/gcc/config/arm/arm.c
Serious props for this tip. Many more kittens and puppies are dancing!
Thank you! saved me hours of agony as well. I was adding a cpp library to an iOS project in which the original dev used the Three20 library-- which was explicitly linking to several old versions of libstdc++
Thank you! I would never guess this is the reason. You save a lot of my hours too.
Post a Comment