<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Cascadia Mono";
panose-1:2 11 6 9 2 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle29
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 85.05pt 70.85pt 85.05pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Hi Abel,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I can recommend vcpkg (<a href="https://vcpkg.io/">https://vcpkg.io/</a>) if you’d like to build GDAL on Windows with Visual Studio
or Visual Studio Community Edition.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">vcpkg builds packages from sources and can build the mandatory dependencies of GDAL (and a lot of optional ones). You get a working
starting set via <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">vcpkg --triplet=x64-windows install curl expat geos lerc libdeflate libgeotiff libiconv libpng libxml2 openssl proj qhull sqlite3[rtree] xerces-c
zlib<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">You can then open GDAL’s CMakeLists.txt file in Visual Studio via File -> Open -> CMake… After configuration, you can just start the
build:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black">>------ Build All started: Project: gdal, Configuration: x64-Debug ------<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [1/1351] Building C object frmts\zlib\CMakeFiles\libz.dir\crc32.c.obj<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [2/1351] Building C object frmts\zlib\CMakeFiles\libz.dir\trees.c.obj<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [3/1351] Building C object frmts\zlib\CMakeFiles\libz.dir\uncompr.c.obj<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:"Cascadia Mono";color:black">...<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [1348/1351] Linking CXX executable fuzzers\tests\test_ogr_fuzzer.exe<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [1349/1351] Linking CXX executable fuzzers\tests\test_gdal_fuzzer.exe<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [1350/1351] Linking CXX executable perftests\bench_ogr_c_api.exe<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"> [1351/1351] Linking CXX executable fuzzers\tests\test_osr_set_from_user_input_fuzzer.exe<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Cascadia Mono";color:black">Build All succeeded.</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">vcpkg builds debug and release versions of the packages. As the packages are built from source, you can even debug into the dependencies
because the source code is on your machine. That can be really helpful from time to time.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I’d recommend starting from a clean environment though. I guess you tweaked quite a lot to get GDAL building.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Stefan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Abel Pau via gdal-dev<br>
<b>Sent:</b> Monday, September 25, 2023 5:25 PM<br>
<b>To:</b> Even Rouault <even.rouault@spatialys.com>; gdal dev <gdal-dev@lists.osgeo.org><br>
<b>Subject:</b> Re: [gdal-dev] About installing EXPAT<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi again,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">well after using CONDA_PREFIX some errors appear about packages that are not included (I suppose).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">archive.dll<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">libcrypto-3-x64.dll<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">libssl-3-x64.dll<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">liblz4.dll<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Are they familiar to you?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">De:</span></b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>>
<br>
<b>Enviado el:</b> dilluns, 25 de setembre de 2023 16:32<br>
<b>Para:</b> Abel Pau <<a href="mailto:a.pau@creaf.uab.cat">a.pau@creaf.uab.cat</a>>; gdal dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>
<b>Asunto:</b> Re: [gdal-dev] About installing EXPAT<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="CA"><o:p> </o:p></span></p>
<p><span lang="CA">Add -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" to your CMake invokation (assuming your have activate your Conda environment, so CONDA_PREFIX is set)<o:p></o:p></span></p>
<p><span lang="CA">My suggestion is inspired from our CI Conda based Windows build:
<a href="https://github.com/OSGeo/gdal/blob/7fc7bb59d2b2de1dca03dd18c14005f2b64adb49/.github/workflows/cmake_builds.yml#L463">
https://github.com/OSGeo/gdal/blob/7fc7bb59d2b2de1dca03dd18c14005f2b64adb49/.github/workflows/cmake_builds.yml#L463</a><o:p></o:p></span></p>
<p><span lang="CA">You should also probably clear your existing CMakeCache.txt before doing the abve, to avoid mixing with variables set from your previous experiments<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="CA">Le 25/09/2023 à 16:21, Abel Pau a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Even,</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I really appreciate your help.</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I prefer going by the easy way so once installed miniconda and applied all the described in download.htm.</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">To have the EXPAT installed I do that: conda install expat</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">And the, when I try the cmake .. some issues appear</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">D:\GitHub-repository\GDAL\build>cmake ..</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- GDAL_VERSION = 3.8.0dev</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- GDAL_ABI_FULL_VERSION = 38</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- GDAL_SOVERSION =</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find MSSQL_NCLI (missing: MSSQL_NCLI_LIBRARY MSSQL_NCLI_INCLUDE_DIR MSSQL_NCLI_VERSION)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find MSSQL_ODBC (missing: MSSQL_ODBC_LIBRARY MSSQL_ODBC_INCLUDE_DIR MSSQL_ODBC_VERSION)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find MySQL (missing: MYSQL_LIBRARY MYSQL_INCLUDE_DIR)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find Iconv (missing: Iconv_LIBRARY Iconv_CHARSET_LIBRARY Iconv_INCLUDE_DIR)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find EXPAT (missing: EXPAT_DIR)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">CMake Error at cmake/helpers/CheckDependentLibraries.cmake:202 (message):</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> Configured to use EXPAT, but not found</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Call Stack (most recent call first):</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> cmake/helpers/CheckDependentLibraries.cmake:348 (gdal_check_package)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> gdal.cmake:265 (include)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> CMakeLists.txt:280 (include)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-- Configuring incomplete, errors occurred!</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">D:\GitHub-repository\GDAL\build></span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">There is something I don’t understand because I don’t know what to do now.</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Why after doing an gdal_master_env and installing everything and expat it doesn’t work?</span></b><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Once again, I appreciate your help :)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><span lang="CA"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">De:</span></b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Even Rouault
<a href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a> <br>
<b>Enviado el:</b> dilluns, 25 de setembre de 2023 14:30<br>
<b>Para:</b> Abel Pau <a href="mailto:a.pau@creaf.uab.cat"><a.pau@creaf.uab.cat></a>; gdal dev
<a href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
<b>Asunto:</b> Re: [gdal-dev] About installing EXPAT</span><span lang="CA"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="CA"> <o:p></o:p></span></p>
<p><span lang="CA">Abel,<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="CA"> <o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">In Cmakefile.txt of the project I’ve configured this (below
</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:green"># Developer may want to specify some variable to find proper version.</span><span lang="CA" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">)</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">:</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:black">(EXPAT_INCLUDE_DIR
</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:#A31515">"D:/GitHub-repository/libexpat/expat/lib"</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:black">)</span><span lang="CA"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:black">(EXPAT_LIBRARY
</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:#A31515">"D:/GitHub-repository/libexpat/expat/build/Debug/libexpatd.lib"</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:black">)</span><span lang="CA"><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="CA">Is this .lib a static library, or an import library of the .dll ? My assumption (I may be wrong) is that it is an import lib of the .dll. In which case you must not set EXPAT_USE_STATIC_LIBS<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="text-autospace:none"><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:black">(EXPAT_LIBRARY
</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:#A31515">"D:/GitHub-repository/libexpat/expat/build/Debug/libexpatd.dll"</span><span lang="CA" style="font-size:9.5pt;font-family:Consolas;color:black">)</span><span lang="CA"><o:p></o:p></span></p>
</blockquote>
<p><span lang="CA">That won't work. This needs to be a .lib<o:p></o:p></span></p>
<p><span lang="CA">You'd better run cmake again on expat with a -DCMAKE_INSTALL_PREFIX=d:/install-prefix and run "cmake --build . --target install", and then when building GDAL, use "cmake .. -DCMAKE_PREFIX_PATH=d:/install-prefix", so it automatically configures
things from what is found in d:/install-prefix<o:p></o:p></span></p>
<p><span lang="CA">You could also potentially use vcpkg or conda to install GDAL dependencies instead of building them from scratch:
<a href="https://gdal.org/download.html">https://gdal.org/download.html</a><o:p></o:p></span></p>
<p><span lang="CA">Even<o:p></o:p></span></p>
<pre><span lang="CA">-- <o:p></o:p></span></pre>
<pre><span lang="CA"><a href="http://www.spatialys.com/">http://www.spatialys.com</a><o:p></o:p></span></pre>
<pre><span lang="CA">My software is free, but my time generally not.<o:p></o:p></span></pre>
</blockquote>
<pre><span lang="CA">-- <o:p></o:p></span></pre>
<pre><span lang="CA"><a href="http://www.spatialys.com/">http://www.spatialys.com</a><o:p></o:p></span></pre>
<pre><span lang="CA">My software is free, but my time generally not.<o:p></o:p></span></pre>
</div>
</body>
</html>