Operating system:Win 7
Slicer version: build slicer V. 4.11
Expected behavior:
Actual behavior:
Hello everybody,
I tried to build the Light Weight Robot IGT module after building the Slicer on my system. After fixing all the compilation errors, I faced with error LNK 2005 as follows which i have no idea how to fix.
Error LNK2005 “public: static class vtkIGTLToMRMLString * __cdecl vtkIGTLToMRMLString::New(void)” (?New@vtkIGTLToMRMLString@@SAPEAV1@XZ) already defined in vtkIGTLToMRMLString.obj
This error is appeared when i add the “vtkSlicerOpenIGTLinkIFModuleMRML.lib” to the linker of the “vtkSlicerLightWeightRobotIGTModuleMRML” project in configuration properties in visual studio.
I would be so appreciated if anyone could help me to fix the error.
Support for STRING message type is now part of OpenIGTLinkIF. You can remove vtkIGTLToMRMLString class from LightWeightRobotIGT.
vtkIGTLToMRMLString in LightWeightRobotIGT saved text data to vtkMRMLAnnotationTextNode, while OpenIGTLinkIF uses vtkMRMLTextNode, so LightWeightRobotIGT need to be updated accordingly.
Thanks Mr. Lasso,
I can fix the errors and build the module based on your suggestion.
But another problem is how to use and install the module in Slicer. I add the path containing the following folder to the “edit—application settings—modules—additional module paths” and then restart the Slicer.
**
the path is:
E:\LightWeightRobotIGT\B\lib\Slicer-4.11\qt-loadable-modules
**
But it seems that there is no changes after restarting the Slicer and even there is no additional module in all modules.
You need to add SlicerOpenIGTLink extension paths to additional module paths. Third-party DLLs need to be added to the same folder where module DLLs are or you need to use the generated additional launcher settings .ini file (that should take care of both the additional module paths and third-party library paths).
you mean that the OpenIGTLink is the third party for the LightWeightRobotIGT?
I built the OpenIGTLink but unfortunately there is no .dll file in OpenIGTLink library folder, there exist just .lib and .exp files.
Besides, how can i use the additional launcher settings .ini file?
I am so interesting to use this module and Slicer and i would be so appreciated if you could help me through.
Note that the path for a module should look like the following:
E:\d\s\SlicerOpenIGTLinkD\inner-build\lib\Slicer-4.11\qt-loadable-modules\Debug
If your extension includes Python modules, then you also need to add:
E:\d\s\SlicerOpenIGTLinkD\inner-build\lib\Slicer-4.11\qt-scripted-modules
You need to specify the additional-module-paths for SlicerOpenIGTLink, as well as one of the following:
Within SlicerOpenIGTLink build, third-party DLLs are in the folder:
E:\d\s\SlicerOpenIGTLinkD/bin/Release or E:\d\s\SlicerOpenIGTLinkD/bin/Debug
and
Copy the DLLs from the folder above to:
E:\d\s\SlicerOpenIGTLinkD\inner-build\lib\Slicer-4.11\qt-loadable-modules\Release or E:\d\s\SlicerOpenIGTLinkD\inner-build\lib\Slicer-4.11\qt-loadable-modules\Debug
You can start Slicer with the following option:
Slicer.exe --launcher-additional-settings E:\d\s\SlicerOpenIGTLinkD\inner-build\AdditionalLauncherSettings.ini
The SlicerOpenIGTLink is now added to Slicer modules based on your guidance.
I want to use the LightWeightRobotIGT module which it’s source code can be found here: https://github.com/SNRLab/LightWeightRobotIGT .
The qt loadable modules are built after building the module in VS2015. The path to the lib folder is as follows:
E:\LightWeightRobotIGT\B\lib\Slicer-4.11\qt-loadable-modules\Release.
Would you please guide me through the installing the module in Slicer?
Can you upload your changes to the LightWeightRobotIGT to a GitHub branch somewhere?
If everything compiles correctly, you should only need to add E:\LightWeightRobotIGT\B\lib\Slicer-4.11\qt-loadable-modules\Release to the additional-module-paths.
(Scenario 1) I was built the LightWeightRobotIGT (LWRIGT) module based on the OpenIGTLink and OpenIGTLinkIF which can be found from: https://github.com/openigtlink/OpenIGTLink,
and https://github.com/openigtlink/OpenIGTLinkIF.
This way and after building the above two modules, the LWRIGT was compiled in VS2015 and the errors were fixed step by step by adding the header and library files to the corresponding project in VS.
(Scenario 2) But now and based on your guidance i found another url as: https://github.com/openigtlink/SlicerOpenIGTLink, which i could load the OpenIGTLink Extension to the module paths after building this extension.
Please let me know if there is any difference in building the LWRIGT module based on these two scenarios…
I am trying to build the module based on your suggestion by adding these two lines to the CMake:
set(EXTENSION_DEPENDS “SlicerOpenIGTLink”)
and
find_package(SlicerOpenIGTLink REQUIRED
But after compiling the project in VS, the error which says that it can not open the ‘vtkIGTLTOMRMLBASE.h’ file is appeared. On the other hand there is no such file in any of the ‘Slicer OpenIGTLink’ folders to add to the VC/VC++ configuration properties.
would you please help me to substitute the file or please let me know that if something wrong will happen by adding the ‘vtkIGTLTOMRMLBASE.h’ file from ‘OpenIGTLinkIF’ folder?? @lassoan@Sunderlandkyl