首页 / 浏览问题 / 桌面GIS / 问题详情
无法解析的外部符号 UGC::UGFeatureClassDefn
8EXP 2020年04月30日
环境:vs2015 + qt5.9;

系统:win10;

代码:示例代码gettingStarted,移入vs2015当中,编译,发生链接错误;

extensions4Qt.lib和dll已经重新编译新的版本,依旧提示无法链接。

error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl UGC::UGFeatureClassDefn::UGFeatureClassDefn(class UGC::UGFeatureClassDefn const &)"

error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual __cdecl UGC::UGFeatureClassDefn::~UGFeatureClassDefn(void)" (

error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class UGC::UGFeatureClassDefn & __cdecl UGC::UGFeatureClassDefn::operator=(class UGC::UGFeatureClassDefn const &)"

1个回答

使用之前需重新编译示例中的extensions4QT工程
35EXP 2020年04月30日
已经编译过了,用的生成后的extensions4QT.dll和lib文件,但还是不行。
vs左上角文件->添加现有项目->extensions4QT,右边栏解决方案管理器项目右键->项目依赖项,将其依赖于extensions4QT,再编译试试
示例代码是qtcreator版本,我转一个vs的工程,一起编译试试看行不行。
不是编译过??应该会有vs工程啊?
没有,示例代码是qtcreator版本的,利用qtcreator版本编译出dll和lib文件后,在vs当中按照帮助文档跑示例代码链接不上。
依赖了Extensions4Qt工程也不行,应该是缺少lib文件吧,看到之前有人也问过这个问题,需要技术人员排查一下。

应该不会啊,我用的也是C组件,到目前运行良好,不缺少东西啊。

要不你试试把所有的LIB都包括进去

SuAlgorithmd.lib
SuAllocationd.lib
SuAnalyst3Dd.lib
SuBase3Dd.lib
SuBased.lib
SuBeyonDBSQLCId.lib
SuBGDataCompilerd.lib
SuBPlusTreed.lib
SuCacheBuilderd.lib
SuCacheFiled.lib
SuChartBased.lib
SuChartToolkitd.lib
SuCompactFiled.lib
SuDataCheckd.lib
SuDataExchanged.lib
SuDB2CId.lib
SuDCPackagerd.lib
SuDCToolkitsd.lib
SuDrawing3Dd.lib
SuDrawingd.lib
SuDrawingLayoutd.lib
SuElementd.lib
SuEngineBaiduMapsd.lib
SuEngineBDd.lib
SuEngined.lib
SuEngineDB2d.lib
SuEngineExtendFiled.lib
SuEngineGBased.lib
SuEngineGoogleMapsd.lib
SuEngineImagePlugind.lib
SuEngineKingbased.lib
SuEngineMapWorldMapsd.lib
SuEngineMySQLd.lib
SuEngineODBCd.lib
SuEngineOGCd.lib
SuEngineOGDCd.lib
SuEngineOpenStreetMapsd.lib
SuEngineOracled.lib
SuEngineOspd.lib
SuEnginePGd.lib
SuEngineRestd.lib
SuEngineSCVd.lib
SuEngineSDEd.lib
SuEngineSMCloudd.lib
SuEngineSQLPLUSd.lib
SuEngineUDBd.lib
SuFileParser3dsd.lib
SuFileParserAcadd.lib
SuFileParserAiGridd.lib
SuFileParserBGRIDd.lib
SuFileParserBMPd.lib
SuFileParserCSVd.lib
SuFileParserd.lib
SuFileParserDEMd.lib
SuFileParserDGNd.lib
SuFileParserE00d.lib
SuFileParserECWd.lib
SuFileParserENCd.lib
SuFileParserFileGDBd.lib
SuFileParserFMEd.lib
SuFileParserGDALd.lib
SuFileParserGJBd.lib
SuFileParserGridd.lib
SuFileParserGTiffd.lib
SuFileParserHFAd.lib
SuFileParserKMLd.lib
SuFileParserLidard.lib
SuFileParserMAPGISd.lib
SuFileParserMitabd.lib
SuFileParserMrSIDd.lib
SuFileParserRAWd.lib
SuFileParserSCVd.lib
SuFileParserSGMd.lib
SuFileParserShaped.lib
SuFileParserSTETd.lib
SuFileParserTEMSd.lib
SuFileParserVCTd.lib
SuFilePyramidd.lib
SuFilePyramidECWd.lib
SuFilePyramidGDALd.lib
SuFilePyramidMrSidd.lib
SuFilePyramidSITd.lib
SuFMELicensed.lib
SuGBaseCId.lib
SuGeneralizationd.lib
SuGeoCoded.lib
SuGeometricNetworkd.lib
SuGeometry3Dd.lib
SuGeometryCADd.lib
SuGeometryd.lib
SuGeometryLayoutd.lib
SuGeoOperation3Dd.lib
SuGeoOperationd.lib
SuGraphics3Dd.lib
SuGraphics3DOGREd.lib
SuGraphicsd.lib
SuGraphicsPSd.lib
SuGraphicsWd.lib
SuGridAnalystd.lib
SuGridModelingd.lib
SuInterNationalICUd.lib
SuLayer3DDatasetd.lib
SuLayer3DFiled.lib
SuLayer3DMapd.lib
SuLayer3DTreed.lib
SuLayoutEditord.lib
SuLinearReferenced.lib
SuLogisticsd.lib
SuMapd.lib
SuMapEditord.lib
SuMapServiceStubd.lib
SuMySQLCId.lib
SuNetToolkitd.lib
SuNetworkBuilderd.lib
SuNetworkEnvironmentd.lib
SuNTopoDataCompilerd.lib
SuNTopoIndexTreed.lib
SuODBCCId.lib
SuOGCParserd.lib
SuOGDCd.lib
SuOracleCId.lib
SuOverlayd.lib
SuParticleSystemd.lib
SuPathAnalystd.lib
SuPathNavid.lib
SuPGSQLCId.lib
SuPluginCommond.lib
SuPluginGECached.lib
SuPluginGlobalCached.lib
SuPluginGridCached.lib
SuPluginMapCache50d.lib
SuPluginMapCached.lib
SuPluginSCVd.lib
SuPluginWebCached.lib
SuProjectiond.lib
SuProximityd.lib
SuPublicTransportd.lib
SuRectifyd.lib
SuRenderd.lib
SuRepresentationd.lib
SuRStarTreed.lib
SuScened.lib
SuSceneEditord.lib
SuSDECId.lib
SuSpatialIndexd.lib
SuSpatialQueryd.lib
SuSQLiteCId.lib
SuStreamd.lib
SuSymbold.lib
SuSymbolExchanged.lib
SuSymbolMarker3Dd.lib
SuTheme3DBased.lib
SuTileStoraged.lib
SuToolkitd.lib
SuTopoBased.lib
SuTopoBuilderd.lib
SuWorkspaced.lib

终于好了,将supermap-iobjectscpp-10.0.0-17726-74479-win-all\lib下对应的lib文件全部输入,OK了,可以排查一下究竟是缺哪个lib文件了。
确定了,需要输入SuFileParserd.lib文件,帮助文档可以更新一下了。
你好,我在编译vs2015+qt12

void QMapControl::Init()
{

    this->setMouseTracking(true);
    // 设置显示引擎类型
    UGGraphicsManager::SetCurGraphicsType(UGGraphics::GT_QT);
    // 初始化MapEditWnd
    m_pMapEditorWnd = new UGMapEditorWnd(); -------这个位置就中断了,
    m_pMapEditorWnd->Initialize();
    m_pMapEditorWnd->SetUserAction(UGDrawParamaters::uaPointModeSelect);
    //m_pMapEditorWnd->m_mapWnd.SetAfterMapDrawFunc(MapDrawnCallBack_QMap, (UGlong)this);
    m_pMapEditorWnd->SetTrackingFunc(TrackingCallBack, (UGlong)this);
    //m_pMapEditorWnd->SetTrackedFunc(TrackedCallBack, (UGlong)this);
}

请问你遇到过吗?卡在这里几天了
这边编译没有遇到过,可以具体描述一下问题?
你好就是我运行自带的例子,包含头文件执行

qMapControl = new QMapControl;然后就在

  m_pMapEditorWnd = new UGMapEditorWnd(); -------这个位置就中断了执行异常
...