在整合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

xcode7: Undefined symbols for architecture i386: "_iconv_open", referenced from:的更多相关文章

  1. Undefined symbols for architecture i386: "_crc32", referenced from:——crc链接错误

    有时候用别人的框架,你会碰到下面的错误,很是吓人,什么玩意,我怎么看不懂!!! Undefined symbols for architecture i386:  "_RELEASE&quo ...

  2. Undefined symbols for architecture i386: "_deflate", referenced from:

    Undefined symbols for architecture i386: "_deflate", referenced from: PlatCompress(enumCom ...

  3. 当编译AFNetworking 2.0时出现了Undefined symbols for architecture i386

    当将AFNetworking添加到工程后编译时出现 Undefined symbols for architecture i386: "_SecCertificateCopyData&quo ...

  4. oc调用c++接口时 报错 Undefined symbols for architecture i386:

    当在oc中调用c++中的方法时,发现说c++中的方法没定义或是找不到 Undefined symbols for architecture i386: "_desTYData", ...

  5. Undefined symbols for architecture i386:和"_OBJC_CLASS_$_xx", referenced from:问题解决方法

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

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

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

  7. 【转】Undefined symbols for architecture i386:和"_OBJC_CLASS_$_xx", referenced from:问题解决方法

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

  8. iOS:编译错误Undefined symbols for architecture i386: _OBJC_CLASS_$_XXX", referenced from: error

    Undefined symbols for architecture i386: _OBJC_CLASS_$_XXX", referenced from: error 这个意思为无法找到名为 ...

  9. 微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced from:

    异常信息: Undefined symbols for architecture i386:  "operator delete[](void*)", referenced fro ...

随机推荐

  1. java 泛型和object比较

    引言 我们使用object和泛型做形参,都是为了让这个方法能接收更多类型的对象,让程序变得更健壮,代码复用率更高.当我们回看自己写的代码时会发现,好像使用泛型的地方使用object也可以,使用obje ...

  2. [Cocos Creator]安卓上微信小游戏加载到100%就进不去了

    最近用Cocos Creator 开发微信小游戏,构建发布到微信上,用安卓手机预览打开后加载到100%就不动了,开始以为微信开发工具版本的问题,后来用苹果的手机测试了一下,发现也有同样的问题. 仔细分 ...

  3. 前端1-----块级标签(独占一行),排版标签(样式排版),其他标签,form表单(input的多种类型)

    前端1-----块级标签(独占一行),排版标签(样式排版),其他标签,form表单(input的多种类型) 一丶HTML块级标签 排版标签 p 标签: 段落标签,会自动在段落上下加上空白来分开 p标签 ...

  4. Idea中编辑后需要重启问题

    发布的artifact要用exploded 配置On Update action 和On frame deactivation为Update classes and resources. 编辑完成后, ...

  5. springboot使用Fiber纤程踩过的坑

    @RequestAttribute为null 在springboot中使用@FiberSpringBootApplication注解标注在SpringBootApplication上时,发现在拦截器( ...

  6. AR-运行自动开票主程序报错

    问题: 在AR运行自动开票主程序时出现如下错误提示: 错误日志: raagsp()+ 当前的系统时间为 12-09-2014 07:23:58 raagsp()- 当前的系统时间为 12-09-201 ...

  7. z = z*z + c的分型图如何画

    使用python的图形库. 环境:conda+jupyter notebook 代码如下: import numpy as np from PIL import Image from numba im ...

  8. Django rest framework 之版本

    一.通过 QueryParameterVersioning 获取版本 通过 QueryParameterVersioning 从 get 请求中获取版本信息: 1.新建 app,名为 api,Proj ...

  9. 发送短信验证码的JAVA代码

    package com.moretickets.platform; import com.alibaba.fastjson.JSONException; import com.alibaba.fast ...

  10. PAT 甲级 1025.PAT Ranking C++/Java

      Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Z ...