开发者

Can I directly access MySQL from iPhone using MYSQL API?

I have developed an iPhone application which needs to access MySQL database on the server. It builds very well on 'iPhone simulator',but when I want to build 'Device' version, it fails with error messages bolow:

ld: warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file was built for i386 which is not the architecture being linked (armv6)

ld: warning: in /usr/local/mysql/lib/libmygcc.a, file was built for unsupported file format which is not the architecture being linked (armv6)

Is it unreachable to access MySQL f开发者_如何学JAVArom iPhone? Or MySQL server library is wrong?


The library that you are trying to link is not for iPhone. Have you checked this question?


Yes, you just need to grab the mysql connector for C and compile it for armv6 and armv7. If you don't want to go through the trouble, you can grab the Objective-C connector for Mysql that I have written and either use the Objective-C API, or just use included .a file which will work on OSX or iOS.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜