【问题标题】:Berkeley DB for iPhoneiPhone 版伯克利数据库
【发布时间】:2012-08-18 02:39:06
【问题描述】:

我曾尝试为 iphone OS 4 创建库,但出现错误。

这是我参考 Berkeley DB 安装指南的构建脚本。

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

这里我收到一条带有 3 个警告的错误消息:

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 unsupported 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

请指导我,我在脚本中做错了什么。

提前致谢。

【问题讨论】:

    标签: ios4 berkeley-db build-script


    【解决方案1】:

    对于关注此主题的任何人,您可能需要查看实际的 OTN 论坛条目以及答案,您可以找到 here

    问候,

    戴夫

    【讨论】:

      【解决方案2】:

      我得到了 Oracle 团队的支持。

      我已经成功地创建了库。

      我已经在我的博客上发布了。请查看 i386 和 armv6 架构的详细构建脚本。

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

      【讨论】:

        【解决方案3】:

        感谢您使用 Berkeley DB 并提出您的问题。 Berkeley DB 团队不经常关注此网站上的问题。您最好在此处的 Berkeley DB 论坛上发布您的问题:

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

        如果您在那里发帖,我们会尽量及时回复。

        问候, 亚历克斯·戈罗德 甲骨文伯克利数据库

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2019-01-27
          相关资源
          最近更新 更多