在64位的win10平台上下载了iobjects c++ 8.1.1,并参照开发指南安装了QT5.3(32位),VS2012等,环境已配置完成。现在QtCreator中打开sample下的Extentions4Qt工程,出现如下链接错误:
error: LNK2019: 无法解析的外部符号
"__declspec(dllimport) public: void __thiscall UGC::UGMapEditorWnd::SetTrackingFunc(void (__cdecl*)(__int64,double,double,int,double,double,double,double,double),__int64)"
(__imp_?SetTrackingFunc@UGMapEditorWnd@UGC@@QAEXP6AX_JNNHNNNNN@Z0@Z),
该符号在函数 "protected: void __thiscall QMapControl::Init(void)" (?Init@QMapControl@@IAEXXZ) 中被引用
对应的源码位置:
QMapControl.cpp
m_pMapEditorWnd = new UGMapEditorWnd();
m_pMapEditorWnd->Initialize();
m_pMapEditorWnd->SetUserAction(UGDrawParamaters::uaPointModeSelect);
m_pMapEditorWnd->SetTrackingFunc(TrackingCallBack, (UGlong)this);
对应的32位链接库文件libd/SuMapEditord.lib中包含了SetTrackingFunc的内容如下:
?SetTrackingFunc@UGMapEditorWnd@UGC@@QAEXP6GX_JNNHNNNNN@Z0@Z (public: void __thiscall UGC::UGMapEditorWnd::SetTrackingFunc(void (__stdcall*)(__int64,double,double,int,double,double,double,double,double),__int64))
对应的64位链接库文件libd_x64/SuMapEditord.lib中包含了SetTrackingFunc的内容如下:
?SetTrackingFunc@UGMapEditorWnd@UGC@@QEAAXP6AX_JNNHNNNNN@Z0@Z (public: void __cdecl UGC::UGMapEditorWnd::SetTrackingFunc(void (__cdecl*)(__int64,double,double,int,double,double,double,double,double),__int64))
对三处进行对比,发现唯一的区别在于QAEXP6AX、QAEXP6GX与QEAAXP6AX的红色部分的区别;
已经确认的情况:
1.库文件libd/SuMapEditord.lib中包含了SetTrackingFunc的内容;
2.确认已正确链接了libd/SuMapEditord.lib库,
请问:怎么解决上述链接错误,谢谢。