I have a CMake project which builds fine both on Windows and on Linux. However, the program only runs well on Linux. On Windows, it fails with a runtime error about the DLLs not being found in the runtime path:
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerRoomsEyeViewModule.dll: The specified module could not be found.
DLL load failed while importing vtkSlicerBeamsModuleLogicPython: The specified module could not be found.
More details here:
SlicerRt:master
← ferdymercury:detached-iec
Build works on Windows as well. The problem with finding the DLL is still there … though. This is the error at startup. It seems the Beams module cannot locate the IEC dll.
```
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerBeamsModule.dll: The specified module could not be found.
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerDicomRtImportExportModule.dll: The specified module could not be found.
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerDicomSroImportExportModule.dll: The specified module could not be found.
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerDrrImageComputationModule.dll: The specified module could not be found.
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerExternalBeamPlanningModule.dll: The specified module could not be found.
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerPlmProtonDoseEngineModule.dll: The specified module could not be found.
[Qt] Error(s):
[Qt] Cannot load library C:\e\e\_Extensions\SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release\qSlicerRoomsEyeViewModule.dll: The specified module could not be found.
DLL load failed while importing vtkSlicerBeamsModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerBeamsModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerBeamsModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomRtImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomRtImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomRtImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
[Qt] When loading module "BatchStructureSetConversion" , the dependency "DicomRtImportExport" failed to be loaded.
[Qt] When loading module "IGRTWorkflow_SelfTest" , the dependency "DicomRtImportExport" failed to be loaded.
```
I am out of ideas on what to try, since I am more an expert on the Linux side but have no experience in the Windows part.
Any orientation on what to try would be greatly appreciated. (If someone wants to reproduce the runtime error, one needs first to build Slicer3D and then the SlicerRt extension. Both are available open-source on GitHub.)
Windows does not have the concept of storage of paths inside the executable where to locate shared libraries. So you have to update PATH
environment variable to expect the executable to find the shared libraries.
hsattler
(Hendrik Sattler)
November 20, 2024, 11:56am
3
…or copy the library to the same directory.