# Strange compiling error

**URL:** <https://discourse.slicer.org/t/strange-compiling-error/23760>\
**Category:** Development\
**Tags:** build\
**Created:** [June 8, 2022, 3:26am UTC](https://discourse.slicer.org/t/strange-compiling-error/23760 "2022-06-08T03:26:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![whu](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@whu](https://discourse.slicer.org/u/whu)\
**Post date:** [June 8, 2022, 3:26am UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/1 "2022-06-08T03:26:11Z")

</div>

When I compiled the SlicerHeart again using CMake. I just want a Release version.  
The `OPENSLL_INCLUDE_DIR` was set to `C:/Slicer/SlicerBuild/OpenSSL-install/Release/include`  
But when compiling, there is error:

```auto
8>CMake Error at C:/Slicer/SlicerBuild/Slicer-build/SlicerConfig.cmake:704 (message):
8> Variable OPENSSL_INCLUDE_DIR defined prior calling 'find_package(Slicer)'
8> does NOT match value used to configure Slicer. It probably means that a
8> different OPENSSL_INCLUDE_DIR has been used to configure this project and
8> Slicer.
8>
8> OPENSSL_INCLUDE_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/Debug/include
8>
8>
8> Slicer_OPENSSL_INCLUDE_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/Release/include
8>Call Stack (most recent call first):
8> C:/Slicer/SlicerBuild/Slicer-build/SlicerConfig.cmake:747 (slicer_config_set_ep)
8> CMakeLists.txt:21 (find_package)
8>
8>
8>-- Configuring incomplete, errors occurred!

```

Maybe the `OPENSSL_INCLUDE_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/Debug/include` is set automatically ??

Anyone who occurred this ?

thanks

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [June 8, 2022, 9:54am UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/2 "2022-06-08T09:54:45Z")

</div>

@RafaelPalomar @jcfr may be able to help woth this I think. Thank you guys

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [June 13, 2022, 8:33am UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/3 "2022-06-13T08:33:59Z")

</div>

Hello @whu. I can try to reproduce this on Linux. I’ll try 3D Slicer `master` branch and SlicerHeart `master` branch. Please, let me know if you have used any other version/commit of any of those.

Rafael.

---

<div class="post-metadata">

**Author:** ![whu](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@whu](https://discourse.slicer.org/u/whu)\
**Post date:** [June 14, 2022, 12:55am UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/4 "2022-06-14T00:55:08Z")

</div>

> [@whu](#):
>
> ybe the OPENSSL\_INCLUDE\_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/De

Thanks.  
Taht is windows platform, VS2019.

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [June 20, 2022, 7:08am UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/5 "2022-06-20T07:08:08Z")

</div>

@whu, I’ve tried the latest Slicer (`master` branch) with the latest SlicerHeart (`master` branch) and I cannot reproduce this problem (Linux, though). From your last reply, it is not clear whether you are using the `master` branch for both Slicer and SlicerHeart. Could you give it a try and let us know if there are still problems?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 20, 2022, 8:17pm UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/6 "2022-06-20T20:17:30Z")

</div>

@whu Could you make sure you are configuring both Slicer and SlicerHeart specifying the same configuration (Debug, Release, …) ?

---

<div class="post-metadata">

**Author:** ![whu](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@whu](https://discourse.slicer.org/u/whu)\
**Post date:** [June 21, 2022, 3:12pm UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/7 "2022-06-21T15:12:17Z")

</div>

I used the debug mode under Windows using vs2019, successful.  
Later I changed to Release mode, then that compiling error happened.  
I am not sure that would be occured again.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 21, 2022, 3:31pm UTC](https://discourse.slicer.org/t/strange-compiling-error/23760/8 "2022-06-21T15:31:30Z")

</div>

> Later I changed to Release mode, then that compiling error happened.

If this was not a clean build, it likely explained the issue. Toggling between built type on windows is not tested or supported.
