开发者

compile error in xcode4 for libxml2.a

I just upgrade my xcode3.2.5 to the xcode4.0 .

But when I rebuild my previous project, errors happened below:

Undefined symbols for architecture armv6: "_iconv", referenced from: _xmlIconvWrapper in libxml2.a(encoding.o) "_iconv_close", referenced from: _xmlFindCharEncodingHandler in libxml2.a(encoding.o) _xmlCharEncCloseFunc in libxml2.a(encoding.o) "_iconv_open", referenced from: _xmlFindCharEncodingHandler in libxml2.a(encoding.o) ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status

An开发者_如何转开发yone help...


Don't know whether you still need the answer or not. Seems like you are missing linking with libiconv.dylib.


Sounds like the libxml2.a static library may not have been built for your target architecture (armv6). Try rebuilding that, or...

It is possible to link against libxml2 dynamically (it is included in iOS). To do so, select the target > build phases > link binary with libraries > click add and select libxml2.dylib from the drop down menu.


You should set Header path to

$(PROJECT_DIR)/Your libiconv Dir/**include**

(e.g, $(PROJECT_DIR)/libiconv-1.14/include).

And set Library path.

Then, check "Link Binary With Libraries".

If you do not set libiconv.a (or libiconv.dylib) to "Link Binary With Libraries" , set it.

Another method that you can check Target membership: project folder tree [see, Xcode left side] -> select libiconv libraries -> check Target Membership (check box on)[see, Xcode right side].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜