1

我正在尝试使用以下 make 命令编译我的 gcc 代码。操作系统:Redhat,gcc - 4.1
但我收到如下错误:rmtrain@lintrni130 $ /usr/local/bin/make all

[ 21%] Built target GCVCore
Linking CXX executable CFE
/usr/bin/ld: warning: libicui18n.so.36, needed by ../../Generic/icu/lib/libicuio.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libxalanMsg.so.110, needed by ../../Generic/Xalan/lib/libxalan-c.so, not found (try using -rpath or -rpath-link)
CMakeFiles/CFE.dir/trnuser1/rmtrain/DevelopmentEnv/Generic/ConvUI/GCVConvUISetting.o: In function `xercesc_2_6::XMLAttDefList::~XMLAttDefList()':
GCVConvUISetting.cpp:(.text._ZN11xercesc_2_613XMLAttDefListD0Ev[xercesc_2_6::XMLAttDefList::~XMLAttDefList()]+0x2f): undefined reference to `xercesc_2_6::XMemory::operator delete(void*)'

请帮助解决这个问题。

4

2 回答 2

0

我重新安装了 icu 3.2 而不是 3.6。然后它工作得很好。

于 2012-06-29T09:53:36.130 回答
0

警告意味着您链接的某些库依赖于其他共享库,并且在链接器的搜索路径中找不到这些库。链接器手册描述了它如何在文档中形成该 选项的搜索路径-rpath-link

它们只是警告,因此不会导致您的链接失败。如果在运行时没有找到那些所需的库,那将是一个问题,但在链接时不一定是一个问题。

如果要使警告静音,则需要找出包含哪个目录libicui18n.so.36libxalanMsg.so.110使用手册中描述的方法之一告诉链接器查看该目录。

最后一行是真正的问题,表明您没有链接到定义该符号的库。您需要找出它是哪个库并使用它链接到它-lfoo,它可能类似于-lxerces

于 2012-06-26T11:51:15.047 回答