# ITKCudaCommon automatic linking error

**URL:** https://discourse.itk.org/t/itkcudacommon-automatic-linking-error/4418
**Category:** Engineering
**Created:** [September 14, 2021, 9:16am UTC](https://discourse.itk.org/t/itkcudacommon-automatic-linking-error/4418 "2021-09-14T09:16:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gabriele\_Belotti](https://discourse.itk.org/user_avatar/discourse.itk.org/gabriele_belotti/32/825_2.png) [@Gabriele\_Belotti](https://discourse.itk.org/u/Gabriele_Belotti)
#### Post date: [September 14, 2021, 9:16am UTC](https://discourse.itk.org/t/itkcudacommon-automatic-linking-error/4418/1 "2021-09-14T09:16:34Z")

</div>

Hi,

I’m trying to update a script that was once linked to RTK module directly (around 1.4).  
I linked against my 5.2 build with only one issue: ITKCudaCommon seems to be referred to without relative path to build\lib\Release. The rest of the components are correctly linked and if I manually add the build\lib\Release\ path the program compiles fine. Have you got any idea of why this would happen?

I’m including my CMakeLists. My ITK version was compiled statically with RTK module ON and also wrapped to Python.

```auto
cmake_minimum_required(VERSION 3.10)

 project(gRTKRecon)
  
 find_package(ITK REQUIRED COMPONENTS RTK ITKCudaCommon)
 include(${ITK_USE_FILE})
  
 add_executable(gRTKRecon ${PROJECT_SOURCE_DIR}/gRTKRecon.cpp {PROJECT_SOURCE_DIR}/gRTKFDK.cpp ${PROJECT_SOURCE_DIR}/gRTKFDK.h)
 
 if( "${ITK_VERSION_MAJOR}" LESS 4 )
   target_link_libraries(gRTKRecon ITKReview ${ITK_LIBRARIES})
 else( "${ITK_VERSION_MAJOR}" LESS 4 )
   target_link_libraries(gRTKRecon ${ITK_LIBRARIES})
 endif( "${ITK_VERSION_MAJOR}" LESS 4 )
 
 
 TARGET_LINK_LIBRARIES(gRTKRecon ${RTK_LIBRARIES})

```

---

<div class="post-metadata">

### Author: ![simon.rit](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@simon.rit](https://discourse.itk.org/u/simon.rit)
#### Post date: [September 14, 2021, 9:55am UTC](https://discourse.itk.org/t/itkcudacommon-automatic-linking-error/4418/2 "2021-09-14T09:55:16Z")

</div>

Hi,  
ITKCudaCommon is not an idependent module yet. If you use the current RTK master, I would not include it in the find\_package command. We are refactoring it to make it independent (see [GitHub - SimonRit/ITKCudaCommon](https://github.com/SimonRit/ITKCudaCommon)) but this is not ready yet.  
Regarding ITKCudaCommon targets, @LucasGandel is working on it, maybe he already has a solution for this?  
Simon
