# vtkSlicerTransformLogic access in CLI module

**URL:** https://discourse.slicer.org/t/vtkslicertransformlogic-access-in-cli-module/1214
**Category:** Development
**Created:** [October 12, 2017, 6:36pm UTC](https://discourse.slicer.org/t/vtkslicertransformlogic-access-in-cli-module/1214 "2017-10-12T18:36:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![danielbr](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danielbr](https://discourse.slicer.org/u/danielbr)
#### Post date: [October 12, 2017, 6:36pm UTC](https://discourse.slicer.org/t/vtkslicertransformlogic-access-in-cli-module/1214/1 "2017-10-12T18:36:59Z")

</div>

Having a small issue that is driving me crazy and I can’t figure it out. It is such a simple problem, but I can’t seem to remedy the problem.

I am writing a CLI module and need access to the transform module logic. I try to get access to it by doing the following:

#include “qSlicerAbstractModule.h”  
#include “qSlicerCoreApplication.h”  
#include “qSlicerModuleManager.h”  
#include “vtkSlicerTransformLogic.h”  
#include \<vtkMRMLTransformNode.h\>

vtkSlicerTransformLogic\* transformLogic= vtkSlicerTransformLogic::SafeDownCast(qSlicerCoreApplication::application()-\>moduleManager()-\>module(“transforms”)-\>logic());

When I try to compile I get this error message “Error 1 error LNK2019: unresolved external symbol “\_\_declspec(dllimport) public: static class vtkSlicerTransformLogic \* \_\_cdecl vtkSlicerTransformLogic::SafeDownCast(class vtkObjectBase \*)” (\__imp_?SafeDownCast@vtkSlicerTransformLogic@@SAPEAV1@PEAVvtkObjectBase@@@Z)”

I have been able to access other module logic doing the exact same thing but I just can’t seem to do it for the transform module. What am I missing here?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [October 12, 2017, 6:37pm UTC](https://discourse.slicer.org/t/vtkslicertransformlogic-access-in-cli-module/1214/2 "2017-10-12T18:37:46Z")

</div>

You need to add transforms logic library to the list of libraries in your CMakeLists.txt.

---

<div class="post-metadata">

### Author: ![danielbr](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danielbr](https://discourse.slicer.org/u/danielbr)
#### Post date: [October 12, 2017, 7:55pm UTC](https://discourse.slicer.org/t/vtkslicertransformlogic-access-in-cli-module/1214/3 "2017-10-12T19:55:22Z")

</div>

> [@lassoan](#):
>
> transforms logic library

Duh. Thanks. Haven’t edited my cmake file in awhile in this module. Didn’t even cross my mind. Works now!
