xcode 4 导入Lib,Framework的方法,和Undefined symbols for architecture x86_64:的一种解决办法

来源:互联网 发布:阿里云https 不信任 编辑:程序博客网 时间:2024/05/16 15:22
最近在使用 sqlite 和 iconv 写一些东西,但是在链接的时候出现了错误。

Undefined symbols for architecture x86_64:

  "_iconv_open", referenced from:

      _main in main.o

  "_iconv", referenced from:

      _main in main.o

  "_iconv_close", referenced from:

      _main in main.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就算使用系统自带的头文件也需要导入lib(sqlite和iconv,Mac都自带),也就是说,单单包含头文件是不够的,还需要加入lib或Framework,具体方法如下:

xcode <wbr>4 <wbr>导入Lib,Framework的方法,和Undefined <wbr>symbols <wbr>for <wbr>architecture <wbr>x86_64:的一种解决办法
原创粉丝点击