[Ctk-developers] Error trying to configure CTK with Qt5

Andras Lasso lasso at queensu.ca
Sun Sep 13 01:30:08 UTC 2020


Thanks for letting us know. If there is anything that you think would help prospective CTK users, please send a pull request that adds that information.

It seems that CTK does not have “Build instructions” page, so maybe you could just add a section in https://github.com/commontk/CTK/blob/master/README.rst and add your notes there.

Andras

From: Ctk-developers <ctk-developers-bounces at public.kitware.com> On Behalf Of Ramazan Ergüder Bekrek
Sent: Saturday, September 12, 2020 8:05 PM
To: ctk-developers at public.kitware.com
Subject: Re: [Ctk-developers] Error trying to configure CTK with Qt5

It seems that the problem was related with Visual Studio 2019!

The solution was presented there describing that CTK might not work with VS2019 because of a bug in the Platform Toolset : https://forum.qt.io/topic/117230/qlinkedlist-undefined-external-symbol<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fforum.qt.io%2Ftopic%2F117230%2Fqlinkedlist-undefined-external-symbol&data=02%7C01%7Classo%40queensu.ca%7Cd54fe2d7396e4480d6f308d85778af25%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637355523168719934&sdata=1ekwVU3zwJpNjEdeOp2AIY9hbLrogZtj5RaWl3TsAWQ%3D&reserved=0>.

Changing the Platform Toolset to a lower version allows the compilation. It is maybe good to mention this issue on the Git repo.


12.09.2020, 03:05, "Ramazan Ergüder Bekrek" <e.bekrek at yandex.com<mailto:e.bekrek at yandex.com>>:
I regenerated the project from scratch just with Core and PluginFramework here are the results:

3>  ctkLogService.cpp
3>  ctkLogStream.cpp
3>  ctkAttributeDefinition.cpp
3>  ctkMetaTypeProvider.cpp
3>  ctkMetaTypeService.cpp
3>  qrc_system_plugin_manifest.cpp
3>  Generating Code...
3>  Compiling...
3>  moc_ctkBasicLocation_p.cpp
3>  moc_ctkDefaultApplicationLauncher_p.cpp
3>  moc_ctkPluginFrameworkDebugOptions_p.cpp
3>  moc_ctkPluginFrameworkListeners_p.cpp
3>  moc_ctkTrackedPluginListener_p.cpp
3>  moc_ctkTrackedServiceListener_p.cpp
3>  Generating Code...
3>Target ResolvedLinkLib:
3>Target Link:
3>     Creating library G:/programming/c++/CTK/CTK_build/bin/Debug/CTKPluginFramework.lib and object G:/programming/c++/CTK/CTK_build/bin/Debug/CTKPluginFramework.exp
3>  ctkPluginFrameworkDebugOptions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QLinkedListData::QLinkedListData(void)" (__imp_??0QLinkedListData@@QEAA at XZ) referenced in function "private: class QLinkedList<class ctkServiceReference>::iterator __cdecl QLinkedList<class ctkServiceReference>::detach_helper2(class QLinkedList<class ctkServiceReference>::iterator)" (?detach_helper2@?$QLinkedList at VctkServiceReference@@@@AEAA?AViterator at 1@V21@@Z)
3>  G:\programming\c++\CTK\CTK_build\bin\Debug\CTKPluginFramework.dll : fatal error LNK1120: 1 unresolved externals
3>Done building target "Link" in project "CTKPluginFramework.vcxproj" -- FAILED.
3>
3>Done building project "CTKPluginFramework.vcxproj" -- FAILED.
3>
3>Build FAILED.
3>
3>ctkPluginFrameworkDebugOptions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QLinkedListData::QLinkedListData(void)" (__imp_??0QLinkedListData@@QEAA at XZ) referenced in function "private: class QLinkedList<class ctkServiceReference>::iterator __cdecl QLinkedList<class ctkServiceReference>::detach_helper2(class QLinkedList<class ctkServiceReference>::iterator)" (?detach_helper2@?$QLinkedList at VctkServiceReference@@@@AEAA?AViterator at 1@V21@@Z)
3>G:\programming\c++\CTK\CTK_build\bin\Debug\CTKPluginFramework.dll : fatal error LNK1120: 1 unresolved externals
3>    0 Warning(s)
3>    2 Error(s)
3>
3>Time Elapsed 00:01:00.01
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


12.09.2020, 02:45, "Ramazan Ergüder Bekrek" <e.bekrek at yandex.com<mailto:e.bekrek at yandex.com>>:
Ok the solution seemed to be related with testing now that I have deactivated it I was able to generate the MSVC 2019 Solution.

I just tried to compile this on Windows 10 and got this error log:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Build started 9/12/2020 2:40:49 AM.
1>Target InitializeBuildStatus:
1>  Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
1>Target CustomBuild:
1>  All outputs are up-to-date.
1>  Checking Build System
1>Target FinalizeBuildStatus:
1>  Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
1>  Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
1>
1>Build succeeded.
1>    0 Warning(s)
1>    0 Error(s)
1>
1>Time Elapsed 00:00:00.53
2>------ Build started: Project: CTKCore, Configuration: Debug x64 ------
2>Build started 9/12/2020 2:40:50 AM.
2>Target ResolveProjectReferences:
2>Target InitializeBuildStatus:
2>  Touching "CTKCore.dir\Debug\CTKCore.tlog\unsuccessfulbuild".
2>Target CustomBuild:
2>  All outputs are up-to-date.
2>Target VcpkgTripletSelection:
2>  Using triplet "x64-windows" from "G:\vcpkg\installed\x64-windows\"
2>Target ClCompile:
2>  ctkBackTrace.cpp
2>  ctkBooleanMapper.cpp
2>  ctkCallback.cpp
2>  ctkCommandLineParser.cpp
2>  ctkCoreSettings.cpp
2>  ctkCoreTestingUtilities.cpp
2>  ctkDependencyGraph.cpp
2>  ctkErrorLogAbstractMessageHandler.cpp
2>  ctkErrorLogAbstractModel.cpp
2>  ctkErrorLogFDMessageHandler.cpp
2>  ctkErrorLogLevel.cpp
2>  ctkErrorLogQtMessageHandler.cpp
2>  ctkErrorLogStreamMessageHandler.cpp
2>  ctkErrorLogTerminalOutput.cpp
2>  ctkException.cpp
2>  ctkFileLogger.cpp
2>  ctkHighPrecisionTimer.cpp
2>  ctkLinearValueProxy.cpp
2>  ctkLogger.cpp
2>  ctkModelTester.cpp
2>  Generating Code...
2>  Compiling...
2>  ctkScopedCurrentDir.cpp
2>  ctkUtils.cpp
2>  ctkValueProxy.cpp
2>  ctkWorkflow.cpp
2>  ctkWorkflowStep.cpp
2>  ctkSetName.cpp
2>  moc_ctkBooleanMapper.cpp
2>  moc_ctkCallback.cpp
2>  moc_ctkCommandLineParser.cpp
2>  moc_ctkCoreSettings.cpp
2>  moc_ctkErrorLogAbstractMessageHandler.cpp
2>  moc_ctkErrorLogAbstractModel.cpp
2>  moc_ctkErrorLogFDMessageHandler_p.cpp
2>  moc_ctkErrorLogLevel.cpp
2>  moc_ctkErrorLogQtMessageHandler.cpp
2>  moc_ctkErrorLogTerminalOutput.cpp
2>  moc_ctkFileLogger.cpp
2>  moc_ctkLinearValueProxy.cpp
2>  moc_ctkLogger.cpp
2>  moc_ctkModelTester.cpp
2>  Generating Code...
2>  Compiling...
2>  moc_ctkValueProxy.cpp
2>  moc_ctkWorkflow.cpp
2>  moc_ctkWorkflow_p.cpp
2>  moc_ctkWorkflowStep_p.cpp
2>  moc_ctkWorkflowTransitions.cpp
2>  Generating Code...
2>Target ResolvedLinkLib:
2>Target Link:
2>     Creating library G:/programming/c++/CTK/CTK_build/bin/Debug/CTKCore.lib and object G:/programming/c++/CTK/CTK_build/bin/Debug/CTKCore.exp
2>  CTKCore.vcxproj -> G:\programming\c++\CTK\CTK_build\bin\Debug\CTKCore.dll
2>Target AppLocalFromInstalled:
2>  G:\programming\c++\CTK\CTK_build\bin\Debug\Qt5Cored.dll
2>  G:\programming\c++\CTK\CTK_build\bin\Debug\zlibd1.dll
2>  G:\programming\c++\CTK\CTK_build\bin\Debug\icuind67.dll
2>  G:\programming\c++\CTK\CTK_build\bin\Debug\icuucd67.dll
2>  G:\programming\c++\CTK\CTK_build\bin\Debug\icudtd67.dll
2>  G:\programming\c++\CTK\CTK_build\bin\Debug\pcre2-16d.dll
2>Target _CopyFilesMarkedCopyLocal:
2>  Touching "G:\programming\c++\CTK\CTK_build\Libs\Core\CTKCore.dir\Debug\CTKCore.vcxproj.CopyComplete".
2>Target GetCopyToOutputDirectoryItems:
2>  Target _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences:
2>Target CopyFilesToOutputDirectory:
2>  Copying file from "G:\programming\c++\CTK\CTK_build\Libs\Core\CTKCore.dir\Debug\CTKCore.pdb" to "G:\programming\c++\CTK\CTK_build\bin\Debug\CTKCore.pdb".
2>Target FinalizeBuildStatus:
2>  Deleting file "CTKCore.dir\Debug\CTKCore.tlog\unsuccessfulbuild".
2>  Touching "CTKCore.dir\Debug\CTKCore.tlog\CTKCore.lastbuildstate".
2>
2>Build succeeded.
2>    0 Warning(s)
2>    0 Error(s)
2>
2>Time Elapsed 00:00:44.72
3>------ Build started: Project: CTKPluginFramework, Configuration: Debug x64 ------
3>Build started 9/12/2020 2:41:35 AM.
3>Target ResolveProjectReferences:
3>Target InitializeBuildStatus:
3>  Touching "CTKPluginFramework.dir\Debug\CTKPlugi.48473AF1.tlog\unsuccessfulbuild".
3>Target CustomBuild:
3>  All outputs are up-to-date.
3>Target VcpkgTripletSelection:
3>  Using triplet "x64-windows" from "G:\vcpkg\installed\x64-windows\"
3>Target ClCompile:
3>  ctkApplicationRunnable.cpp
3>  ctkBasicLocation.cpp
3>  ctkDefaultApplicationLauncher.cpp
3>  ctkLDAPExpr.cpp
3>  G:\programming\c++\CTK\Libs\PluginFramework\ctkLDAPExpr.cpp(623,19): error C2064: term does not evaluate to a function taking 0 arguments
3>  ctkLDAPSearchFilter.cpp
3>  ctkLocationManager.cpp
3>  ctkPlugin.cpp
3>  ctkPluginArchive.cpp
3>  ctkPluginArchiveSQL.cpp
3>  ctkPluginConstants.cpp
3>  ctkPluginContext.cpp
3>  ctkPluginDatabaseException.cpp
3>  ctkPluginEvent.cpp
3>  ctkPluginException.cpp
3>  ctkPluginFramework.cpp
3>  ctkPluginFrameworkFactory.cpp
3>  ctkPluginFrameworkContext.cpp
3>  ctkPluginFrameworkDebug.cpp
3>  ctkPluginFrameworkDebugOptions.cpp
3>  ctkPluginFrameworkEvent.cpp
3>  Generating Code...
3>  Compiling...
3>  ctkPluginFrameworkProperties.cpp
3>  ctkPluginFrameworkLauncher.cpp
3>  ctkPluginFrameworkListeners.cpp
3>  ctkPluginFramework_p.cpp
3>  ctkPluginFrameworkUtil.cpp
3>  ctkPluginLocalization.cpp
3>  ctkPluginManifest.cpp
3>  ctkPlugin_p.cpp
3>  ctkPlugins.cpp
3>  ctkPluginStorageSQL.cpp
3>  ctkRequirePlugin.cpp
3>  ctkServiceEvent.cpp
3>  ctkServiceException.cpp
3>  ctkServiceProperties.cpp
3>  ctkServiceReference.cpp
3>  ctkServiceReference_p.cpp
3>  ctkServiceRegistration.cpp
3>  ctkServiceRegistration_p.cpp
3>  ctkServices.cpp
3>  ctkServiceSlotEntry.cpp
3>  Generating Code...
3>  Compiling...
3>  ctkVersion.cpp
3>  ctkVersionRange.cpp
3>  ctkApplicationDescriptor.cpp
3>  ctkApplicationException.cpp
3>  ctkApplicationHandle.cpp
3>  ctkConfiguration.cpp
3>  ctkConfigurationAdmin.cpp
3>  ctkConfigurationEvent.cpp
3>  ctkConfigurationException.cpp
3>  ctkConfigurationPlugin.cpp
3>  ctkLocation.cpp
3>  ctkDebugOptions.cpp
3>  ctkEvent.cpp
3>  ctkEventConstants.cpp
3>  ctkLogService.cpp
3>  ctkLogStream.cpp
3>  ctkAttributeDefinition.cpp
3>  ctkMetaTypeProvider.cpp
3>  ctkMetaTypeService.cpp
3>  qrc_system_plugin_manifest.cpp
3>  Generating Code...
3>  Compiling...
3>  moc_ctkBasicLocation_p.cpp
3>  moc_ctkDefaultApplicationLauncher_p.cpp
3>  moc_ctkPluginFrameworkDebugOptions_p.cpp
3>  moc_ctkPluginFrameworkListeners_p.cpp
3>  moc_ctkTrackedPluginListener_p.cpp
3>  moc_ctkTrackedServiceListener_p.cpp
3>  Generating Code...
3>Done building target "ClCompile" in project "CTKPluginFramework.vcxproj" -- FAILED.
3>
3>Done building project "CTKPluginFramework.vcxproj" -- FAILED.
3>
3>Build FAILED.
3>
3>G:\programming\c++\CTK\Libs\PluginFramework\ctkLDAPExpr.cpp(623,19): error C2064: term does not evaluate to a function taking 0 arguments
3>    0 Warning(s)
3>    1 Error(s)
3>
3>Time Elapsed 00:00:59.16
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


12.09.2020, 02:15, "Ramazan Ergüder Bekrek" <e.bekrek at yandex.com<mailto:e.bekrek at yandex.com>>:

Greetings to all!

I'm having some issues with CMake and CTK and I would like to have your guidance concerning what I am doing wrong.

The following error is triggered while trying to configure CTK with Qt5:

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
Generated: G:/programming/c++/CTK/CTK_build/DGraphInput-alldep.txt
Generated: G:/programming/c++/CTK/CTK_build/DGraphInput-alldep-withext.txt
Generated: G:/programming/c++/CTK/CTK_build/DGraphInput.txt
SuperBuild - First pass
CMake Error at CMake/ctkMacroCheckExternalProjectDependency.cmake:801 (message):
  Can't find CTKData.cmake
Call Stack (most recent call first):
  CMake/ctkBlockCheckDependencies.cmake:134 (ExternalProject_Include_Dependencies)
  CMakeLists.txt:910 (include)


I thought that based on the documentation the only external dependency I needed was Qt4/Qt5.
Can someone explain to me why does this happen?

Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20200913/6cd5cc5c/attachment.htm>


More information about the Ctk-developers mailing list