IOS編譯報錯:objcclassrefinAppDelegate.o之解決方案__IOS

來源:互聯網
上載者:User

xcode6.0升級到xcode6.1後,程式編譯報錯,錯誤如下:這是個很常見的錯誤,很多項目在更換xcode版本後,都會出現類似的問題。


Undefined symbols for architecture x86_64:

"_OBJC_CLASS_$_QQApiInterface", referenced from:

objc-class-ref in AppDelegate.o

"_OBJC_CLASS_$_ShareSDK", referenced from:

objc-class-ref in AppDelegate.o

objc-class-ref in RecipeDetailViewController.o

objc-class-ref in showViewController.o

objc-class-ref in video_show.o

"_OBJC_CLASS_$_TencentOAuth", referenced from:

objc-class-ref in AppDelegate.o

"_OBJC_CLASS_$_WXApi", referenced from:

objc-class-ref in AppDelegate.o

"_OBJC_CLASS_$_WeiboApi", referenced from:

objc-class-ref in AppDelegate.o

"_OBJC_CLASS_$_YXApi", referenced from:

objc-class-ref in AppDelegate.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

解決方案:

Xcode升級到6.1.1 預設讓所有App都通過64位編譯器編譯。原來在Xcode6.0的時候預設的Architectures只有(arm7,armv7s),到6.1.1預設就帶上arm64的參數了。


1.把1.選中Targets—>Build Settings—>Architectures。

把build active architectures only 改為 NO。

2. 把最下面的Valid Architectures中的arm64參數刪掉就可以了

或者:

雙擊Architectures,選擇other,刪除$(ARCH_STANDARD),然後增加armv7和armv7s(寫上:$(ARCHS_STANDARD_32_BIT))。

3.clean 再build。

結果設定如下圖:


目前設定完成後,問題順利解決,大家有更好的解決方案,歡迎討論。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.