PDA

View Full Version : mysql on iPhone 2.2



macdeveloper
8th January 2009, 08:15 PM
I am trying to implement mysql in my app for iPhone 2.2.
I have downloaded the mysql source from MySql Source 5.1 (http://dev.mysql.com/downloads/mysql/5.1.html#source) then I have properly compiled it with terminal, but when I get the resulting static lib libmysqlclient.a and link it to my XCode project-release-iphone, I get an error when compiling:

ld warning: in Libs/iPhone/libmysqlclient.a, file is not of required architecture. I have compiled the mysql sources with these 3 commands in terminal:

./configure --prefix=/usr/local --enable-cross-compile --host=arm-apple-darwin9.6.0 --target=arm-apple-darwin9.6.0 --with-machine-type=arm

make

sudo make install Then I took the library libmysqlclient. from /usr/local/mysql/lib
My big question is: how to set the ./configure text line in Terminal in order to properly compile the mysql source for the iPhone 2.2?
Any pointer would be greatly welcome. Thank you.

Currawong
8th January 2009, 09:47 PM
I've split this into its own thread, since it's unique enough for its own topic.

Comet
8th January 2009, 10:57 PM
Is there a reason why you need mysql on your app vs using sqlite?

macdeveloper
8th January 2009, 11:55 PM
Is there a reason why you need mysql on your app vs using sqlite?

Because as I know sqlite works on local database only. Instead I need to get data from a remote db giving host, port, username, password and database name.