AIX下C++与XML编译的问题,急急急!!!

richardyanglq 2002-07-13 06:06:12
我们公司在aix下进行数据库交易系统的开发,出现了这样一个预想不到的问题:
在linux7.1下编写的程序,用g++ 2.96版本编译,用的是 xerces-c1_7_0解析器,进行编译,正常通过。转移到了aix4.3.2下,用xlC5.0.1进行编译,出现了这样的一大串错误:
# make
xlC -c -g -I/usr/include/xercesc -I. -I/usr/IBMdb2/V7.1/include -I/var
/cics/include -DSELECT -DCICS_LINUX -DKCXP_ENABLE -DDAEMONTHREAD -DUSECICS -DDB2
_ENABLE -o public.o public.cpp
"/usr/include/xercesc/util/XMLEnumerator.hpp", line 87.30: 1540-0121 (S) A templ
ate cannot have "C" linkage.
"/usr/include/xercesc/util/RefVectorOf.hpp", line 96.30: 1540-0121 (S) A templat
e cannot have "C" linkage.
"/usr/include/xercesc/util/RefVectorOf.hpp", line 151.30: 1540-0121 (S) A templa
te cannot have "C" linkage.
"/usr/include/xercesc/util/RefVectorOf.c", line 103.35: 1540-0140 (S) The text "
<" is unexpected. "RefVectorOf" may be undeclared, ambiguous or may require "ty
pename" qualification.
。。。 。。。
我怀疑是用了xlC编译的原因,我有用gcc 3.1 for aix,还是出现了这样的错误:
# gmake -f makefile_test
/usr/share/gcc3/bin/g++ -c -g -I/usr/include/xercesc -I. -I/usr/IBMdb2/V7.1/in
clude -I/var/cics/include -DSELECT -DCICS_LINUX -DKCXP_ENABLE -DDAEMONTHREAD -DU
SECICS -DDB2_ENABLE -o public.o public.cpp
In file included from /usr/share/gcc3/include/g++-v3/backward/strstream:51,
from /usr/share/gcc3/include/g++-v3/backward/strstream.h:33,
from XML.hpp:29,
from public.hpp:5,
from public.cpp:1:
/usr/share/gcc3/include/g++-v3/backward/backward_warning.h:32:2: warning: #warni
ng This file includes at least one deprecated or antiquated header. Please consi
der using one of the 32 headers found in section 17.4.1.2 of the C++ standard. E
xamples include substituting the <X> header for the <X.h> header for C++ include
s, or <sstream> instead of the deprecated header <strstream.h>. To disable this
warning use -Wno-deprecated.
In file included from /usr/include/xercesc/util/RefVectorOf.hpp:93,
from /usr/include/xercesc/util/XMLString.hpp:193,
from XML.hpp:44,
from public.hpp:5,
from public.cpp:1:
。。。 。。。
我从网上看了很多的资料,还是解决不了,好像用C++的TEMPLATE于C一块编译时总是有问题,不知道怎么解决,唉,这里卡住了,老板不会放过我啊,还请各位高手帮忙哪,急急急!!!
...全文
47 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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