compiling iphone program in snow leopard wtih libsqlite3 library
Posted
by user360297
on Stack Overflow
See other posts from Stack Overflow
or by user360297
Published on 2010-06-10T08:26:19Z
Indexed on
2010/06/10
8:33 UTC
Read the original article
Hit count: 529
Hi,
I develop an iphone application which uses sqlite3 as a database. That time my OS X version was leopard. So add added libsqlite3.0.dylib to frameworks and compile without any problems it complied and with any problems I could run it on the device as well.
This week I installed Snow Leopard on my Mac. Removing old Leopard version and install a fresh Snow leopard system.
But my problem is now I cannot compile that program because it will give errors with sqlite3 library. I added sqlite3.0.dylib using selecting targets and then selecting file. Also tried adding selecting it from directly /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/lib
I get two different errors when I compiled to device and to simulator
when compiled to device, ld: warning: in /opt/local/lib/libsqlite3.0.dylib, file is not of required architecture*
When compiled to simulator, ld: warning: in /opt/local/lib/libsqlite3.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
i also tried with adding sqlite3.dylib (, I think sqlite3.0.dylib is linked to sqlite3.dylib.) but no luck.
Could any one out there give me any help. I'm really trying to get this working. Please let me if you want more details.
Thank you, Waruna
© Stack Overflow or respective owner