# \[help!\] Error while linking in SlicerOpenCV

**URL:** <https://discourse.slicer.org/t/help-error-while-linking-in-sliceropencv/22700>\
**Category:** Development\
**Tags:** sliceropencv\
**Created:** [March 26, 2022, 2:19pm UTC](https://discourse.slicer.org/t/help-error-while-linking-in-sliceropencv/22700 "2022-03-26T14:19:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [March 26, 2022, 2:19pm UTC](https://discourse.slicer.org/t/help-error-while-linking-in-sliceropencv/22700/1 "2022-03-26T14:19:42Z")

</div>

I’m working on the linux build of SlicerOpenCV.

All of the dependencies build fine, and I get the following error when linking the extension

```auto
[92%] Linking CXX executable ../../../bin/qSlicerOpenCVModuleCxxTests
/usr/bin/ld: ../../../bin/qSlicerOpenCVModuleCxxTests: hidden symbol `deflate' in /home/ROBARTS/arankin/SCVR/OpenCV-install/lib/opencv4/3rdparty/libzlib.a(deflate.c.o) is referenced by DSO
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

```

Preliminary google searches indicate that this is an error in static and dynamic linking, with a dynamic library (the extension) trying to link to a static library (libzlib) with a hidden symbol.

Should I configure CMake to tell opencv to link against the VTK zlib library? Any other ideas?

@jcfr @lassoan
