在整合cocos和quick时,出现这个错误,我按照以前的方法

link binary with libraries 中add libiconv.2.dylib ,发现已经没有了这个库。

网上找了一下,找到一个:

问题:

I use libxml to save game data. in order to support chinese character, i use iconv to convert format.
but a linke error was appeard:

Undefined symbols for architecture i386:
"_iconv_open", referenced from:
FConverter::code_convert(char*, char*, char*, unsigned long, char*, unsigned long)in GameData.o
"_iconv", referenced from:
FConverter::code_convert(char*, char*, char*, unsigned long, char*, unsigned long)in GameData.o
"_iconv_close", referenced from:
FConverter::code_convert(char*, char*, char*, unsigned long, char*, unsigned long)in GameData.o
ld: symbol(s) not found for architecture i386

I was not familiar with mac os and xcode, so i try to resolve it refer to visual c++.
I found a configuration in target/Build Phase and search iconv, there are three dylib under the list.
libiconv.2.4.0.dylib
libiconv.2.dylib
libiconv.dylib.
i select libiconv.dylib. compile error was resolved.

but i am not sure is this the best solution, and will it cause another problem later.

does dylib mean dynamic library like dll? if i have to public or share my application with this dylib file as windows application combine dll file.

thanks a lot.
:D

解答:

After Xcode 7, Apple did a lot to strip the size of apps, including changing .dylib to .tbd.
Here you don't need to add library & framework but you can add the library by changing the following option:
Other Linker Flags > Add "-l{yourlibraryname} (no space after -l)
In your case, you can add -liconv in Other Linker Flags.

原文地址:http://discuss.cocos2d-x.org/t/link-error-in-xcode-4-2-iconv-error/1173

转载于:https://www.cnblogs.com/ZhYQ-Note/p/5911861.html

xcode7: Undefined symbols for architecture i386: _iconv_open, referenced from:相关推荐

  1. MAC下编译AOSP问题:Undefined symbols for architecture i386

    MAC编译AOSP遇到SDK版本编译问题 ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14 ...

  2. Undefined symbols for architecture i386:_OBJC_CLASS_$_xx, referenced from: 解决方法

    多个人共同操作同一个项目或拷贝项目时,经常会出现类似这样的问题: Undefined symbols for architecture i386: "_OBJC_CLASS_$_xx文件名& ...

  3. xcode编译Undefined symbols for architecture i386问题解决

    Undefined symbols for architecture i386: "_OBJC_CLASS_$_XXX", referenced from: objc-class- ...

  4. Undefined symbols for architecture i386问题解决方法

    个人共同操作同一个项目或拷贝项目时,经常会出现类似这样的问题: Undefined symbols for architecture i386: "_OBJC_CLASS_$_xx文件名&q ...

  5. Undefined symbols for architecture i386:问题解决

    2019独角兽企业重金招聘Python工程师标准>>> 这里优先感谢azhou_hui,大部分内容引用自他的博文,增加了一种错误可能,部分有增删,原文传送门http://blog.c ...

  6. Undefined symbols for architecture i386: _OBJC_CLASS_$_JPUSHService

    接触同事的代码,有用到极光,运行时发现问题: 1.Edit Scheme -> Build Configuration 这里设置成 Debug 的时候,会出现cocoapod 的文件无法导入(p ...

  7. Undefined symbols for architecture i386和”_OBJC_CLASS_$_xx文件名, referenced from:

    分析原因: 1. .m文件没有导入 在Build Phases里的Compile Sources 中添加报错的文件 2. .framework文件没有导入 静态库编译时往往需要一些库的支持,查看你是否 ...

  8. Undefined symbols for architecture i386: _OBJC_CLASS_$_AVOSCloud, referenced from:

    1down vote if you are using cocoapods make sure your target's build settings contain $(inherited) in ...

  9. 关于Undefined symbols for architecture x86_64这个错的总结

    最近在Mac上做一个程序,需要调用动态链接库,出现两次Undefined symbols for architecture x86_64的错误,所以总结下. 第一个是: Undefined symbo ...

最新文章

  1. 使用nGraph的Intel®Xeon®上的高性能TensorFlow
  2. 分布式面试题(含解答)
  3. java channelexec_java-使用SSH exec通道调用Shell脚本,但忽略对其他Shell脚本的调用
  4. python中的print
  5. nandflash与文件系统,oob区数据扫盲。后面还会补充实际生产烧录的心得体验,依据不同的文件系统
  6. android商城开源框架,Android商城开源项目--轻松购
  7. VirtualBox 无权限问题
  8. JasperReport+iReport进行java报表开发
  9. DMR对讲机的基本概念理解
  10. 小米2S稳定版 教你如何一键ROOT
  11. GoJS学习-节点渐变背景色
  12. mysql严格区分大小写吗_MySQL是否区分大小写
  13. linux配置文件密码加密工具,Linux下利用openssl对文件进行加密和解密
  14. Python-小实战-1.0
  15. 普通用户登录出现“sorry, that didn‘t work please try again”
  16. 数学建模拿到赛题后怎么办及一些(“歪门邪道”)小技巧——赛前必看
  17. 3d变换基础:平移、旋转、缩放(仿射变换)详解——公式推导
  18. 宝塔面板安装docker 再到docker容器里面安装宝塔
  19. OLA端点问题实际应用效果
  20. sporadic偶发实时任务多核分区动态优先级EDF(或者DM)调度(以及可调度性分析)经典算法详解

热门文章

  1. 怎的使用jstack诊断Java应用程序故障
  2. Linux crontab 详细介绍及执行php
  3. ben we_惊!WE辅助选手Ben离开WE,大舅子还能再有这么默契的辅助吗?
  4. db2 linux 导入数据_实现DB2数据库迁移之导入步骤在Linux下
  5. python集合运算_python 集合(set)
  6. mysql哪一款好用_用了这么多年MySql,这些好习惯你用过哪些
  7. 让我当你的圣诞老人吧,派发3本技术好书
  8. 欺诈场景中的随机森林实践(基于SAS场景的实现)
  9. Elasticsearch基本操作 1:ES 基本操作、批处理
  10. 3.10 datetime