我在Mac上,当我试图编译unixODBC for arm7时,我遇到了libtool链接问题(供我在iOS中使用)。我下载了unixODBC来自他们的网站,并使用以下脚本对其进行配置和制作。
#!/bin/sh
# unset some shell variables
unset CC
unset CFLAGS
unset CPP
# make arm target
export CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
export CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk"
export CPP=/usr/bin/cpp
./configure --build=x86_64-apple-darwin12 --host=arm-apple-darwin10 --target=armv7 --enable-static --disable-shared
make all./configure运行良好,但在make all期间它会中断。我得到以下错误:
Undefined symbols for architecture armv7:
"_lt_libltdlc_LTX_preloaded_symbols", referenced from:
_lt_dlinit in libodbc.a(libltdlc_la-ltdl.o)
ld: symbol(s) not found for architecture armv7我将错误范围缩小到make all在exe目录中运行时,特别是在运行以下命令时
/bin/sh ../libtool --tag=CC --mode=link /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -pthread -o isql isql.o ../DriverManager/libodbc.la ../extras/libodbcextraslc.la 我不太清楚为什么会失败。我已经检查了lt_dlinit函数是否存在,从我所能判断的情况来看,一切都是正确的。然而,我使用libtool的经验是不存在的,我处理链接器问题的经验也不广泛。
任何帮助,我可以提供任何必要的补充信息。提前谢谢你!
发布于 2013-02-07 11:04:23
也许值得一跑
libtoolize --复制-ltdl
在unixODBC构建树的根部复制本地版本的libtool
https://stackoverflow.com/questions/14740987
复制相似问题