免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2074 | 回复: 1
打印 上一主题 下一主题

关于 zlib [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-21 18:34 |只看该作者 |倒序浏览
在安装sdcv的时候,编译显示错误是"checking for zlibversion in -lz... no
                                                configure: error:zlib not found"
可是我装了zlib-1.2.2还是不行.编译结果还是同上面一样.
于是我打开configure文件有关于zlib的程序,如下,麻烦高手帮我解释一下,这段程序大概什么意思,有什么用的?


echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char zlibVersion ();
int
main ()
{
zlibVersion ();
  ;
  return 0;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -z "$ac_cxx_werror_flag"
                         || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_z_zlibVersion=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_z_zlibVersion=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
if test $ac_cv_lib_z_zlibVersion = yes; then
  LIBS="$LIBS -lz"
else
  { { echo "$as_me:$LINENO: error: zlib not found" >&5
echo "$as_me: error: zlib not found" >&2;}
   { (exit 1); exit 1; }; }
fi

十分感谢呀!!!!!!!!!!!!!!!

[ 本帖最后由 ein 于 2007-12-21 18:36 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-12-21 18:46 |只看该作者
原帖由 ein 于 2007-12-21 18:34 发表
在安装sdcv的时候,编译显示错误是"checking for zlibversion in -lz... no
                                                configure: error:zlib not found"
可是我装了zlib-1.2.2还是不行.编译结果还是同 ...


安裝上您 linux distro 提供的 zlib-devel 這類 package 即可.

--
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP