请教一个编译错误

踏实每一步 2013-05-28 11:12:51
[root@localhost WebInfoLinux]# make
g++ -o HCSniffer -L../public/lib/xercesc -ldl -lnsl -lcrypto -lXercesMessages -lxerces-c -lpthread -lexpat -lnet7ssh -lbotan main.o TestContent.o XMLDeal.o timeControl.o SSH.o LogModule.o ConfigModule.o FTP.o systemControl.o addressParamInfo.o downloadParamInfo.o memoryDeal.o binreloc.o sendpackage.o systeminfo.o sendPackageInfo.o commModule.o
/usr/bin/ld: warning: libicuuc.so.34, needed by ../public/lib/xercesc/libxerces-c.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicudata.so.34, needed by ../public/lib/xercesc/libxerces-c.so, not found (try using -rpath or -rpath-link)
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_totitle_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ures_close_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `udata_setAppData_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_getMaxCharSize_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_foldCase_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_tolower_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_toUChars_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_setFromUCallBack_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_charType_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ures_getByKey_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_init_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `UCNV_FROM_U_CALLBACK_STOP_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_fromUnicode_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `uloc_setDefault_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_fromUChars_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_toupper_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ures_open_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_getMinCharSize_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_close_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `u_isspace_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `UCNV_FROM_U_CALLBACK_SUBSTITUTE_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_open_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_toUnicode_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ures_getStringByIndex_3_4'
../public/lib/xercesc/libxerces-c.so: undefined reference to `ucnv_openU_3_4'
collect2: ld 杩斿洖 1
make: *** [HCSniffer] 閿欒 1
...全文
187 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
踏实每一步 2013-05-28
  • 打赏
  • 举报
回复
比如:./public/lib/xercesc/libxerces-c.so: undefined reference to `u_totitle_3_4' 在包含的头文件中,代码中都没有u_totitle_3_4,为什么还提示这个找不到
踏实每一步 2013-05-28
  • 打赏
  • 举报
回复
搞定了。。。。给分
踏实每一步 2013-05-28
  • 打赏
  • 举报
回复
确实没有34,但有36的。现在把34从原先系统移过来然后再/etc/ld.so.conf添加后,运行 [root@localhost WebInfoLinux]# ldconfig ldconfig: /mnt/shared/public/lib/icu/libicuuc.so.34 is not a symbolic link ldconfig: /mnt/shared/public/lib/icu/libicutu.so.34 is not a symbolic link ldconfig: /mnt/shared/public/lib/icu/libiculx.so.34 is not a symbolic link ldconfig: /mnt/shared/public/lib/icu/libicule.so.34 is not a symbolic link ldconfig: /mnt/shared/public/lib/icu/libicuio.so.34 is not a symbolic link ldconfig: /mnt/shared/public/lib/icu/libicui18n.so.34 is not a symbolic link ldconfig: /mnt/shared/public/lib/icu/libicudata.so.34 is not a symbolic link
prohibit 2013-05-28
  • 打赏
  • 举报
回复
引用 1 楼 NOLA 的回复:
比如:./public/lib/xercesc/libxerces-c.so: undefined reference to `u_totitle_3_4' 在包含的头文件中,代码中都没有u_totitle_3_4,为什么还提示这个找不到
u_totitle_3_4等不一定是直接在代码里调用的,也可能是封装在库libxerces-c.so里调用的,你看看有没有libicuuc.so.34和libicudata.so.34两个库
looklzg1105 2013-05-28
  • 打赏
  • 举报
回复
/usr/bin/ld: warning: libicuuc.so.34, needed by ../public/lib/xercesc/libxerces-c.so, not found (try using -rpath or -rpath-link) ibxerces-c.so 需要 libicuuc.so,你看看是不是缺少了库文件。

23,120

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧