编译C编写的针对TimesTen的程序报错,大家帮忙看看

sailer_shi 2010-12-08 04:57:13
我在编译我的程序的时候报:
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .TTGlobal::log(std::ostrstream&,TTLog::TTLOG_LEVEL)
ld: 0711-317 ERROR: Undefined symbol: .TTStatus::appendErrMsg(std::ostrstream&)

我的代码是:
#include "ttclasses/TTConnection.h"
#include "ttclasses/TTCmd.h"

int CMemDBCall::Connect(char* pDBStr)
{
int Ret = -1;
char errormsg[256] = {0};
TTConnection conn;
TTStatus ttstat;
TTCmd QrySubsInfoCmd;
try
{
conn.Connect(pDBStr, ttstat);
if (ttstat.rc)
{
sprintf(errormsg,"connect db is error: [%s] \n",ttstat);
printf(errormsg);
return -1;
}
m_bConnected = true;
}
catch(...)
{
cout << "connect db is error!" << endl;
Ret = -1;
}
char* QrySubsInfoSQL="select custname from subscriber where phone_no = :v1";
try
{
QrySubsInfoCmd.Prepare(&conn,QrySubsInfoSQL,"",ttstat);
conn.Commit(ttstat);
}
catch (TTStatus st) {
conn.Disconnect(ttstat);
printf("prepare select cmd error!");
return -1;
}
QrySubsInfoCmd.setParam(1,"123456");
try
{
QrySubsInfoCmd.Execute(ttstat);
}
catch (TTStatus st)
{
printf("execute error!");
return 0;
}
QrySubsInfoCmd.FetchNext(ttstat);

QrySubsInfoCmd.getColumn(1, CustName);
return 0;

}

当我写上 "QrySubsInfoCmd.setParam(1,"123456");" 这句的时候就会报下面的错误,如果我不写的话就编译通过
buildclient -o /build/BOSSV2R3/CUSTOMIZE/HEB/interface_tt/build/objs_agent_tt/../../../../..//CUSTOMIZE/HEB/interface_tt/build/objs_agent_tt/IntAgent -f " AgentMain.o IntAgent.o AgentCsc.o AgentNetB.o AgentDualChannel.o AgentBankHeb.o AgentBankWithAuth.o AgentUas.o AgentMedia.o PUBErrMsgMap.o AgentXml.o AgentTLV.o AppEnv.o agentrulecfg.o agenttablestruct.o convertorfactory.o paraconvertor.o servnumregion.o lock_multi.o TLV.o BaseVarDef.o CommandDef.o UASPkgDecode.o readwritelock.o XMLElement.o XmlUtil.o ShmImpl.o SocketImpl.o sys_utils.o BkUniCall.o dbc_factory.o mwadt_factory.o param_hook.o RequestContext.o mwadt_tux.o PUB_DICTITEM.o config.o memdbcall.o " -f " -L/build/BOSSV2R3/CUSTOMIZE/HEB/interface_tt/build/objs_agent_tt/../../../../..//BUSINESS/ngframework/build/lib/aix64 -lbase -lshr_sta -lmpr_sta" -f "-L/tt/TimesTen/tt1121/lib -ltten -lttclasses " -f "/usr/lib/libm.a" -f "/usr/lib/libbsd.a" -f "/usr/lib/libiconv.a" -w
ld: 0711-317 ERROR: Undefined symbol: .TTGlobal::log(std::ostrstream&,TTLog::TTLOG_LEVEL)
ld: 0711-317 ERROR: Undefined symbol: .TTStatus::appendErrMsg(std::ostrstream&)[/color]
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
CMDTUX_CAT:512: ERROR: Cannot execute C compiler xlC -I$TUXDIR/include -o /build/BOSSV2R3/CUSTOMIZE/HEB/interface_tt/build/objs_agent_tt/../../../../..//CUSTOMIZE/HEB/interface_tt/build/objs_agent_tt/IntAgent -qstaticinline -L${TUXDIR}/lib -q64 -D_LARGE_FILES -D__XCOFF32__ -D__XCOFF64__ AgentMain.o IntAgent.o AgentCsc.o AgentNetB.o AgentDualChannel.o AgentBankHeb.o AgentBankWithAuth.o AgentUas.o AgentMedia.o PUBErrMsgMap.o AgentXml.o AgentTLV.o AppEnv.o agentrulecfg.o agenttablestruct.o convertorfactory.o paraconvertor.o servnumregion.o lock_multi.o TLV.o BaseVarDef.o CommandDef.o UASPkgDecode.o readwritelock.o XMLElement.o XmlUtil.o ShmImpl.o SocketImpl.o sys_utils.o BkUniCall.o dbc_factory.o mwadt_factory.o param_hook.o RequestContext.o mwadt_tux.o PUB_DICTITEM.o config.o memdbcall.o -L/build/BOSSV2R3/CUSTOMIZE/HEB/interface_tt/build/objs_agent_tt/../../../../..//BUSINESS/ngframework/build/lib/aix64 -lbase -lshr_sta -lmpr_sta -L/tt/TimesTen/tt1121/lib -ltten -lttclasses /usr/lib/libm.a /usr/lib/libbsd.a /usr/lib/libiconv.a -brtl $TUXDIR/lib/wstpinit.o -lwsc -lbuft -lwsc -lgpnet -lfml -lfml32 -lengine -lpthread
gmake: *** [IntAgent_tt] Error 1

大家有没有碰到过这样的现象呢?
请大家不吝赐教
...全文
163 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,209

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 其他数据库
社区管理员
  • 其他数据库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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