我已經爲iOS構建了一個靜態庫。我的問題是我在我的庫中使用ASIHTTPRequest作爲示例,當我將庫添加到已使用ASIHTTPRequest庫的應用程序時,出現編譯器錯誤,直到我從使用我的庫的項目中刪除所有ASIHTTPRequest .m文件。爲iOS構建一個靜態庫
有沒有辦法解決這個問題?例如,構建靜態庫並使其需要ASIHTTP庫而不是將它們添加到項目中?
編輯:
以下是錯誤的一個例子,我得到一次我「檔案」項目。
ld: duplicate symbol _main in /Users/tj/Library/Developer/Xcode/DerivedData/db-afhqjyfitjcnbqdmywezdvmryvyp/ArchiveIntermediates/db/IntermediateBuildFilesPath/db.build/Release-iphoneos/db.build/Objects-normal/armv6/fmdb.o and /Users/tj/Library/Developer/Xcode/DerivedData/db-afhqjyfitjcnbqdmywezdvmryvyp/ArchiveIntermediates/db/IntermediateBuildFilesPath/db.build/Release-iphoneos/db.build/Objects-normal/armv6/main.o for architecture armv6
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
特勞斯蒂
什麼是編譯器錯誤,大多數人的錯誤與此獲得與您複製文件的可達性做。 – 2011-05-25 18:39:06
我不記得了,但它與所有已經包含的.m文件有關 – 2011-05-25 18:44:15
我現在無法檢查,因爲我正在對圖書館進行重大改寫 – 2011-05-25 18:46:06