gpt4 book ai didi

c++ - 移植到 AIX 6.1 (ld : 0711-317 ERROR: Undefined symbol) with Xerces

转载 作者:太空宇宙 更新时间:2023-11-04 04:28:33 28 4
gpt4 key购买 nike

AIX 6.1

将应用程序从 AIX 5.3 移植到 AIX 6.1,并在 AIX 5.3 中成功构建。我在尝试在 6.1 中构建相同的内容时遇到以下错误。

  1. 能够从 C 和 C++ 源代码编译和创建库
  2. 尝试使用库创建运行时可执行文件时,出现以下错误

观察结果

以下错误似乎是在尝试调用“libdocxml.a”库中的函数时出现的,该库之前已使用 xlC 编译器成功构建。

使用的编译器:xlC_r,用于构建所有库和应用程序的相同编译器。

注意:

可执行文件在 5.3 中引用该库正确构建。但在 6.1 中同样会出现上述错误。

该库与 xml 解析器相关(xercesparser:XML4C 和 Xerces-C)

请仔细阅读以下错误描述的末尾部分。实际错误在最后定义。

任何帮助将不胜感激。提前致谢。

xlC_r -o acbbatch acbbatch.o acbbankserv.o acbbatchmain.o acbdinersclub.o acbmastercard.o acbmoneytransfer.o acbtype.o acbxcept.o acbcats.o -bloadmap:acbbatch.m /nci5d10/prod/c/lib/libti.a /nci5d10/prod/c/lib/libdocxml.a /nci5d10/prod/c/lib/libintxml.a /nci5d10/prod/c/lib/libdatalayer.a /nci5d10/prod/c/lib/libsql.a /nci5d10/prod/c/lib/libshared.a /nci5d10/prod/c/lib/libstatdoc.a /nci5d10/prod/c/lib/libfeeeng.a /oracle/app/oracle/product/11.1.0/lib32/libclntsh.a
ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-344 See the loadmap file acbbatch.m for more information.
ld: 0711-317 ERROR: Undefined symbol: .DOM_NamedNodeMap::DOM_NamedNodeMap()
ld: 0711-317 ERROR: Undefined symbol: .DOMString::DOMString()
ld: 0711-317 ERROR: Undefined symbol: .DOM_NamedNodeMap::operator=(const DOM_NamedNodeMap&)
ld: 0711-317 ERROR: Undefined symbol: .DOMString::operator=(const DOMString&)
ld: 0711-317 ERROR: Undefined symbol: .DOMString::DOMString(const char*)
ld: 0711-317 ERROR: Undefined symbol: .DOMString::~DOMString()
ld: 0711-317 ERROR: Undefined symbol: .DOMString::transcode() const
ld: 0711-317 ERROR: Undefined symbol: .DOMString::length() const
.....
.....
.....
make: The error code from the last command is 8

来自 .M 文件++++++++++++++++++

(ld): halt 4
(ld): setopt tmplrename
(ld): setfflag 4
(ld): cdtors 0 all 0 s
(ld): savename acbbatch
(ld): filelist 27 1
(ld): i /lib/crt0.o
(ld): i /lib/crti.o
(ld): i acbbatch.o
(ld): i acbbankserv.o
(ld): i acbbatchmain.o
(ld): i acbtype.o
(ld): i acbxcept.o
(ld): i acbcats.o
(ld): i /nci5d10/prod/c/lib/libti.a
(ld): i /nci5d10/prod/c/lib/libdocxml.a
(ld): i /nci5d10/prod/c/lib/libintxml.a
(ld): i /nci5d10/prod/c/lib/libdatalayer.a
(ld): i /nci5d10/prod/c/lib/libsql.a
(ld): i /nci5d10/prod/c/lib/libshared.a
(ld): i /nci5d10/prod/c/lib/libstatdoc.a
(ld): i /nci5d10/prod/c/lib/libfeeeng.a
(ld): i /oracle/app/oracle/product/11.1.0/lib32/libclntsh.a
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/vac/lib/libxlipa.a
(ld): lib /usr/vac/lib/libxl.a
(ld): lib /usr/vacpp/lib/libC.a
(ld): lib /usr/lib/libpthreads.a
(ld): lib /usr/lib/libm.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object /oracle/app/oracle/product/11.1.0/lib32/libclntsh.ahttp://shr.o: 20863 symbols imported.
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://shr_32.imp: 402
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://shr2_32.imp: 42
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://shr3_32.imp: 34
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://ansi_32.imp: 2441
LIBRARY: Shared object libC.ahttp://ansi_32.o: 2651 symbols imported.
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://shr_64.imp: 0
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://shr2_64.imp: 0
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://shr3_64.imp: 0
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.ahttp://ansi_64.imp: 0
LIBRARY: Shared object libc.ahttp://pse.o: 8 symbols imported.
LIBRARY: Shared object libc.ahttp://dl.o: 4 symbols imported.
LIBRARY: Shared object libc.ahttp://pty.o: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 27
(ld): resolve
ld: 0711-228 WARNING: Duplicate symbols were found while resolving symbols.
The following duplicates were found:
Symbol Source-File(Object) OR Import-File{Shared-object}

------------------------------------------------------------------------------------------------

.bcopy {/oracle/app/oracle/product/11.1.0/lib32/libclntsh.ahttp://shr.o}
** Duplicate ** moveeq.s(/usr/lib/libc.ahttp://moveeq.o)
RESOLVE: 1825 of 85325 symbols were kept.
RESOLVE: The return code is 4.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 141 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
<小时/>
.__ct__16DOM_NamedNodeMapFv 518 ER PR docattributes.C(/nci5d10/prod/c/lib/libdocxml.ahttp://docattributes.o)
00000060 .text R_RBR 149 .__ct__13tDocAttributeFv
.__ct__9DOMStringFv 323 ER PR docerrorreporter.C(/nci5d10/prod/c/lib/libdocxml.ahttp://docerrorreporter.o)
000002a8 .text R_RBR 178 .fatalError__17tDocErrorReporterFRC17SAXParseException
000002bc .text R_RBR 178 .fatalError__17tDocErrorReporterFRC17SAXParseException
00000548 .text R_RBR 191 .error__17tDocErrorReporterFRC17SAXParseException
0000055c .text R_RBR 191 .error__17tDocErrorReporterFRC17SAXParseException
000008c8 .text R_RBR 222 .warning__17tDocErrorReporterFRC17SAXParseException
000008dc .text R_RBR 222 .warning__17tDocErrorReporterFRC17SAXParseException
.__ct__9DOMStringFv 520 ER PR docattributes.C(/nci5d10/prod/c/lib/libdocxml.ahttp://docattributes.o)

最佳答案

我之前在 AIX 上见过 Xerces 和 undefined symbol 的问题,该问题与可以指定给 xlc 编译器的符号修饰选项有关。 xerces 是否有可能使用 -qnamemaning 标志(通常设置为 v6ansi)构建?如果您在 xerces 库上运行 dumpnm 而没有对符号进行去重整,我敢打赌,它们的符号不会与链接器错误中的重整符号相匹配。

关于c++ - 移植到 AIX 6.1 (ld : 0711-317 ERROR: Undefined symbol) with Xerces,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6103714/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com