将静态库(Strip样式:非全局符号)链接到i386架构的iOS应用程序时出错 断言失败:(atom-> fixupCount()== 1)
建立armv7或armv7s时链接工作正常,所以问题只发生在i386(模拟器)上。
Xcode版本:4.5.2(也用4.6(4H104c)测试 - 预览)
有没有人知道如何解决这个问题?
0 0x10ecde098 __assert_rtn + 144
1 0x10ecf33b2 mach_o::relocatable::ObjC2ClassRefsSection<x86>::targetClassName(mach_o::reloca table::Atom<x86> const*, ld::IndirectBindingTable const&) const + 136
2 0x10ecf3219 mach_o::relocatable::ObjC2ClassRefsSection<x86>::contentHash(mach_o::relocatabl e::Atom<x86> const*, ld::IndirectBindingTable const&) const + 9
3 0x10ecf141e mach_o::relocatable::Atom<x86>::contentHash(ld::IndirectBindingTable const&) const + 42
4 0x10ed17d53 std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<ld::Atom const*, unsigned int>, void*>*> std::__1::__hash_table<std::__1::pair<ld::Atom const*, unsigned int>, std::__1::__unordered_map_hasher<ld::Atom const*, unsigned int, ld::tool::SymbolTable::ReferencesHashFuncs, true>, std::__1::__unordered_map_equal<ld::Atom const*, unsigned int, ld::tool::SymbolTable::ReferencesHashFuncs, true>, std::__1::allocator<std::__1::pair<ld::Atom const*, unsigned int> > >::find<ld::Atom const*>(ld::Atom const* const&) + 37
5 0x10ed1713f ld::tool::SymbolTable::findSlotForReferences(ld::Atom const*, ld::Atom const**) + 111
6 0x10ed1b7b6 ld::tool::Resolver::convertReferencesToIndirect(ld::Atom const&) + 124
7 0x10ed1b59e ld::tool::Resolver::doAtom(ld::Atom const&) + 802
8 0x10ecf4e56 mach_o::relocatable::File<x86>::forEachAtom(ld::File::AtomHandler&) const + 54
9 0x10ed1476c ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&) + 420
10 0x10ed1d884 ld::tool::Resolver::resolve() + 44
11 0x10ecde380 main + 370
12 0x10eccfcd4 start + 52
A linker snapshot was created at:
/tmp/EncapUI-2012-11-12-170500.ld-snapshot
ld: Assertion failed: (atom->fixupCount() == 1), function targetClassName, file /SourceCache/ld64/ld64-136/src/ld/parsers/macho_relocatable_file.cpp, line 4973.
clang: error: linker command failed with exit code 1 (use -v to see invocation)