开发者

Berkeley DB for iPhone

I had tried to create the library for iphone OS 4, but was getting errors.

Here are my build scripts with reference to Berkeley DB Installation guide.

export DEV_iOS=/Developer/Platforms/iPhoneOS.platform/Developer
export SDK_iOS=${DEV_iOS}/SDKs/iPhoneOS4.2.sdk
export COMPILER_iOS=${DEV_iOS}/usr/bin
export CC=${COMPILER_iOS}/gcc
export CXX=${COMPILER_iOS}/g++
export LDFLAGS="-arch armv6 -pipe -Os -gdwarf-2 -no-cpp-precomp -mthumb -isysroot ${SDK_iOS}"
export CFFLAGS=${LDFLAGS}
export CXXFLAGS=${LDFLAGS}
../dist/configure --host=arm-apple-darwin10 --with-cryptography=no --enable-shared=no
make

Here I am getting an error message with3 warnings:

libtool: link: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -O3 -o db_archive -arch armv6 -pipe -Os -gdwarf-2 -no-cpp-precomp -mthumb -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk db_archive.o util_sig.o libdb-5.1.a -lpthread
ld: warning: in db_archive.o, file was built for i386 which is not the architecture being linked (armv6)
ld: warning: in util_sig.o, file was built for i386 which is not the architecture being linked (armv6)
ld: warning: in libdb-5.1.a, file was built for unsupport开发者_如何学Ced file format which is not the architecture being linked (armv6)
Undefined symbols:
"_main", referenced from:
_main$non_lazy_ptr in crt1.o
(maybe you meant: _main$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [db_archive] Error 1

Please guide me, where I am doing wrong in the scripts.

Thanks in advance.


For anyone following this thread, you may want to look at the actual OTN Forum entry with the answer, which you can find here.

Regards,

Dave


I have got Oracle team support.

I had been successfully able to create the library.

I have posted it on my blog. Please check the detailed build script for i386 and armv6 architectures.

http://ankitthakur.wordpress.com/2011/01/16/build-scripts-for-berkely-db-static-libraries-with-ios-development/


Thanks for using Berkeley DB and your question. The Berkeley DB team doesn't often follow questions on this website. You are best to post your question on the Berkeley DB forum here:

http://forums.oracle.com/forums/forum.jspa?forumID=271

If you post there, we will try to respond promptly.

Regards, Alex Gorrod Oracle Berkeley DB

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜