"Apple Mach-O(id)链接器"将外部库添加到项目时出错 [英] "Apple Mach-O (id) linker" error when adding external libraries to project

查看:155
本文介绍了"Apple Mach-O(id)链接器"将外部库添加到项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将FMDB添加到我的项目中,然后添加了框架libsqlite3.dylib和libsqlite3.0.dylib,但是仍然出现构建错误.如果我从项目中删除FMDB类,则可以正常构建.我还应该检查什么?

I added FMDB to my project then added the frameworks libsqlite3.dylib and libsqlite3.0.dylib, but I still get the build error. If I remove the FMDB classes from my project then it builds just fine. What other things should I check?

有关该错误的详细信息:

Detailed info on the error:

Ld/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug->iphonesimulator/iNROMockUp5.app/iNROMockUp5普通i386 cd/iOSDev/Testing/iNROMockUp5 setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv路径>"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bi> n:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386> -isysroot>/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk-> L/Users /gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5-> gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug-iphonesimulator-> F/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5-> gjmgpakysx iphonesimulator-文件列表>/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5-> gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug-> iphonesimulator/iNROMockUp5.build/Objects-NormalList/i386 -> version-min = 10.6 -Xlinker -objc_abi_version -Xlinker 2 -lsqlite3 -lsqlite3.0-框架> MapKit-框架UIKit-框架基础-框架CoreGraphics -o>/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5 -> gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug-> iphonesimulator/iNROMockUp5.app/iNROMockUp5

Ld /Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug->iphonesimulator/iNROMockUp5.app/iNROMockUp5 normal i386 cd /iOSDev/Testing/iNROMockUp5 setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH >"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bi>n:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 >-isysroot >/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk ->L/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug-iphonesimulator ->F/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug-iphonesimulator -filelist >/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal/i386/iNROMockUp5.LinkFileList -mmacosx->version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lsqlite3 -lsqlite3.0 -framework >MapKit -framework UIKit -framework Foundation -framework CoreGraphics -o >/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Products/Debug->iphonesimulator/iNROMockUp5.app/iNROMockUp5

ld:/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal中的重复符号_main fmdb.o和>/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5-> gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug-> iphonesimulator/iNROMockUp5.build/Objects-normal/i386.建筑i386 collect2:ld返回1退出状态 命令/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2失败>退出代码为1

ld: duplicate symbol _main in /Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal/i386/fmdb.o and >/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal/i386/main.o for architecture i386 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed >with exit code 1

ld:/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal中的重复符号_main fmdb.o和>/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5-> gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug-> iphonesimulator/iNROMockUp5.build/Objects-normal/i386.架构i386

ld: duplicate symbol _main in /Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal/i386/fmdb.o and >/Users/gmi/Library/Developer/Xcode/DerivedData/iNROMockUp5->gjmgpakyszrgwbbxnkdxehexacxm/Build/Intermediates/iNROMockUp5.build/Debug->iphonesimulator/iNROMockUp5.build/Objects-normal/i386/main.o for architecture i386

命令/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2失败,退出代码为1

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

推荐答案

从项目中删除fmdb.m,就可以了.

Remove fmdb.m from your project and you will be fine.

这篇关于"Apple Mach-O(id)链接器"将外部库添加到项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆