# ngsolve deinstallation confuses cmake on Windows 10

**URL:** https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758
**Category:** Usage
**Created:** [October 30, 2022, 10:32am UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758 "2022-10-30T10:32:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Kai](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.cmake.org/u/Kai)
#### Post date: [October 30, 2022, 10:32am UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758/1 "2022-10-30T10:32:03Z")

</div>

Hi Guys,  
there is a weird behavior on Windows 10 after uninstalling some old version of ngsolve (ngsolve-v6.2.2104).  
If i want to compile some C++ program, that is not ngsolve related, in the linking stage zlib.lib is not found any more. Until now i did not need to handle zlib.lib in any way. To solve the problem i tried to download zlib from GnuWin32 on sourceforge and set ZLIB\_LIBRARY and ZLIB\_INCLUDE\_DIR.

the error message reads

Code:

LINK : fatal error LNK1104: Datei “C:\Program Files\ngsolve-v6.2.2104\Lib\zlib.lib”

i am out of ideas, please help ! 🙂

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [October 30, 2022, 3:43pm UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758/2 "2022-10-30T15:43:31Z")

</div>

It seems that “some C++ program” is using zlib and happened to find the ngsolve copy? You’ll need to get a different zlib to compile against.

---

<div class="post-metadata">

### Author: ![Kai](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.cmake.org/u/Kai)
#### Post date: [November 2, 2022, 7:44am UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758/3 "2022-11-02T07:44:50Z")

</div>

If “some C++ program” uses zlib, then implicitly. It uses a bunch of libraries, Qt or assimp i.e., but not ngsolve. To solve the problem i tried to download zlib from GnuWin32 on sourceforge and set ZLIB\_LIBRARY and ZLIB\_INCLUDE\_DIR. But the problem further consists.  
It is also confusing that it referes to ngsolve-v6.2.2104 not ngsolve-v6.2.2204. I uninstalled ngsolve-v6.2.2104 and installed ngsolve-v6.2.2204, this is the event the problem occures.

So it is not a problem of “missing” zlib i think, zlib is present at least in ngsolve-v6.2.2204 but also Qt or assimp ship with some copy i know. It is a reference problem …

I also asked in the ngsolve forum but no solution until now, and since it is very cmake specific in my point of view i hoped to get some knowledge about how cmake looks up for libs on windows …

even the global and user specific path variables did not contain any reference to ngsolve-v6.2.2104 …

---

<div class="post-metadata">

### Author: ![Kai](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.cmake.org/u/Kai)
#### Post date: [November 2, 2022, 7:45am UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758/4 "2022-11-02T07:45:39Z")

</div>

may be it helpes to uninstall/install cmake ?

---

<div class="post-metadata">

### Author: ![ChrisJaquet](https://discourse.cmake.org/user_avatar/discourse.cmake.org/chrisjaquet/32/304_2.png) [@ChrisJaquet](https://discourse.cmake.org/u/ChrisJaquet)
#### Post date: [November 2, 2022, 7:49am UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758/5 "2022-11-02T07:49:32Z")

</div>

It sounds like a cached variable has not been updated. Have you deleted the CMakeCache (after removing ngsolve and installing the gnuwin32 version of zlib) and tried running CMake again?

---

<div class="post-metadata">

### Author: ![Kai](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.cmake.org/u/Kai)
#### Post date: [November 2, 2022, 9:07am UTC](https://discourse.cmake.org/t/ngsolve-deinstallation-confuses-cmake-on-windows-10/6758/6 "2022-11-02T09:07:13Z")

</div>

Yes, i deleted the whole build folder and do configure/generate cmake command
