linker command failed with exit code 1 (use -v to see invocation)解决办法

[cpp] view plaincopy

  1. Undefined symbols for architecture i386:  
  2.   "_OBJC_CLASS_$_FMDatabase", referenced from:  
  3.       objc-class-ref in ViewController.o  
  4. ld: symbol(s) not found for architecture i386  
  5. clang: error: linker command failed with exit code 1 (use -v to see invocation)  

在导入百度地图sdk和ASI第三方库的时候都遇到过这种问题,在网上查找了各种资料,今天就总结一下各种办法1、可能引入了重复的文件,仔细查找一下删掉重复的就好了2、可能缺少库或者文件,网上搜索一下你所引入的第三方库还需要别的什么系统库才能正常使用,跳转到“Build Phases”标签,展开“Link Binary With Libraries”分组,点击“+”添加类库,将那些库引入进去就好了3、我们在使用这些第三方类库文件时直接将其拖拽到工程之中,编译的的时候Xcode也没有自动引用,所以造成这样错误,这就需要我们手动添加。解决办法是:在工作左边导航栏Target-->Build Phases-->compile Sources中,第三库库的所有.m文件都添加到里面

4、 Build settings->Linking->Other Linker Flags将此属性修改成-all_load  或者 -ObjC 


反正各种办法都试试吧,网上我一共找到了这几种方法,不过大多时候都可能是缺少系统类库

时间: 2024-08-06 11:57:20

linker command failed with exit code 1 (use -v to see invocation)解决办法的相关文章

linker command failed with exit code 1 (use -v to see invocation),经典Xcode编译错误的出现和解决!

linker command failed with exit code 1 (use -v to see invocation)这个肯定是个xcode编译运行的时候经典的报错了. 这个问题曾经在我的项目编译和运行的时候多次出现,但是从来没有记录过.现在就想每次出现对它进行一下记录,这样为以后出现同样的问题的时候让自己也有个更加快速的方法找到解决之路. linker command failed with exit code 1 (use -v to see invocation)有很多种情况,

IOS Bugs5 linker command failed with exit code 1 (use -v to see invocation)

Ld /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Products/Debug/OC_Language normal x86_64 cd /Users/Rubert/IOS/iworkspace/OC_Language export MACOSX_DEPLOYMENT_TARGET=10.10 /Applications/Xcode-beta.ap

添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试

本文转载至 http://blog.csdn.net/duxinfeng2010/article/details/8265273 linker command failed with exit code 1 (use -v to see invocation)这个错误貌似遇见并不止一次,当我想用某个第三方类库的时候(如SBJson),我直接把类库文件copy到工程目录里面,然后一编译就出现这样错误(并不是一定会出这样错误),开始以为是网上下载的类库本身问题,所以重新找类库或者其他方式将它添加进去

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

再把项目上传到SVN仓库上,然后再拉到本地编译时出现如下错误 ld: library not found for -lxxxxxxxxxxxx clang: error: linker command failed with exit code 1 (use -v to see invocation) 原因: SVN在上传资源服务器时默认配置会把一些第三方的.a库文件等给忽略了,然后就造成这样的错误. 解决办法: 配置global-ignores文件 因为我用的是Cornerstone图像工具,

调试错误_ linker command failed with exit code 1 (use -v to see invocation)_ 文件 添加问题

问题类型: 编译错误 问题描述: 文件链接错误 d: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Library/Fram

iOS 报错: linker command failed with exit code 1 (use -v to see invocation) 原因

在iOS开发中,很多人会遇到这样的报错 linker command failed with exit code 1 (use -v to see invocation) 可能的原因如下: 1.引用出错,把***.h弄成了.m,检查一下你的所有引用: 2.再就是你引用第三方的库,你添加文件是系统没有所第三方库的.m文件参入的编译中去,你向项目添加文件得注意了; 3.找到Build settings->Linking->Other Linker Flags,将此属性修改成-all_load或-O

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

; color:rgb(54,46,43); font-family:Arial,Console,Verdana,'Courier New'"> 像这样的一大堆,总体说编译链接时错误 /Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Products/Debug-iphonesimulator/ClothingOrders.ap

IOS 随笔 -- _OBJC_CLASS_$xxx", referenced from:和 linker command failed with exit code 1 (use -v to see invocation)问题解决

因为项目需求需要根据用户的信息生成二维码,二维码SDK主流(ZXing)(ZBar),我选择的是(ZBar),但是在添加过程中出现了这样的问题: "_OBJC_CLASS_$_xx文件名", referenced from: linker command failed with exit code 1 (use -v to see invocation) file:///Users/tudali/Desktop/屏幕快照%202014-11-06%2017.42.44.png 问题处理

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

转自:http://blog.csdn.net/tiantian1980/article/details/9175777 像这样的一大堆,总体说编译链接时错误 /Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Products/Debug-iphonesimulator/ClothingOrders.app/ClothingOrder