<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Joaquim,
<blockquote type="cite"
cite="mid:GVXPR04MB99260035942F55374DC0E55DA69E9@GVXPR04MB9926.eurprd04.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now, the weirdest part is that this happens
in a new computer with Win11 but the GDAL repo dir was copied
from another computer (that has Win10) and there this error
does not show up. Both are built with same version of VS.</p>
</div>
</blockquote>
<p>So you also copied a build directory with existing CMakeCache.txt
and other generated files? I don't think this is a safe practice,
unless your source & target computers are exactly the same.</p>
<p>What if you build from a clean build directory ?</p>
<p>Is there a M_LIB line in the CMakeCache.txt of the Win10 and
Win11 computers?</p>
<p>If you update to latest master (or cherry-pick
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/commit/0a062f8ab132e22d1bace91081d606584b8e8d7c">https://github.com/OSGeo/gdal/commit/0a062f8ab132e22d1bace91081d606584b8e8d7c</a>),
run "cmake -DSHOW_DEPS_PER_TARGET=YES [...]", and look in the
output messages lines starting with "Target [xxx]: links against"
and containing m.lib . That should hopefully give a clue of which
third-party library drag this m.lib dependency<br>
</p>
<p>Even<br>
</p>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>