如何为ansi编译器传递LDFLAGS

我想在 HPUX 上编译支持 openldap 的 krb5,gcc 太过时了(4!)所以我使用 HP ansi 编译器

我运行这个脚本

export CC="/opt/acc/bin/cc"
export AR="/usr/ccs/bin/ar"
export LD="/usr/ccs/bin/ld"

# Compile
cd krb5-$VERSION
cd src
./configure \
  --prefix=/opt/krb5 \
  --sbindir=/opt/krb5/sbin \
  --mandir=/opt/krb5/man \
  --docdir=/opt/krb5/doc \
  --sysconfdir=/etc \
  --localstatedir=/var/opt/krb5 \
  --runstatedir=/var/opt/krb5/run \
  --enable-dns-for-realm \
  --with-ldap LDflaGS='-L/usr/local/lib/hpux64'

但是返回这个错误

checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking lber.h usability... yes
checking lber.h presence... yes
checking for lber.h... yes
checking for ldap_str2dn in -lldap... no
configure: error: libldap not found or missing ldap_str2dn

函数存在

nm /usr/local/lib/hpux64/libldap.a | grep str2dn                               
[158]    |                     0|     240|FUNC |GLOB |0|   .text|ldap_str2dn
[35]     |                     0|       0|FUNC |GLOB |0|   UNDEF|ldap_str2dn

找到了包含,没有找到库,为什么?如何将非标准路径传递给ansi编译器?

wondernuaa 回答:如何为ansi编译器传递LDFLAGS

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/1028164.html

大家都在问