<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Fengting,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The Windows error message might be telling you that while it was loading the plugin library, that DLL was required to load another DLL(s), from the SDK probably, and that is not in the PATH.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size:12pt">You need to check if the plugin DLL was built against a static or a dynamic SDK library. Static would make your deployment easier, but some SDK make it hard to build this way.</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Good luck,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Ivan<br>
<span style="font-size:12pt"></span><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org> on behalf of Fengting Chen <fengting.chen@oracle.com><br>
<b>Sent:</b> Thursday, February 24, 2022 9:10 PM<br>
<b>To:</b> gdal-dev@lists.osgeo.org <gdal-dev@lists.osgeo.org><br>
<b>Subject:</b> Re: [gdal-dev] [External] : Re: how to build netCDF driver plugin</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:DengXian}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Consolas}
@font-face
        {}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.x_MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
p
        {margin-right:0in;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
p.x_msonormal0, li.x_msonormal0, div.x_msonormal0
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif}
span.x_EmailStyle19
        {font-family:"Calibri",sans-serif;
        color:windowtext}
span.x_HTMLPreformattedChar
        {font-family:Consolas}
span.x_EmailStyle22
        {font-family:"Calibri",sans-serif;
        color:#1F497D}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="color:#1F497D">After fix the plugin library name, the netCDF driver plugin on linux is working. However, it still didn’t work on windows:
</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">E:\tmp\gdal>gdalinfo</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">ERROR 1: Can't load requested DLL: E:\tmp\gdal\bin\gdalplugins\gdal_netCDF.dll</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">126: The specified module could not be found.</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">ERROR 1: Can't load requested DLL: E:\tmp\gdal\bin\gdalplugins\gdal_netCDF.dll</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">126: The specified module could not be found.</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">I verified that specified gdal_netCDF.dll exists at above directory and netcdf.dll is in the path of %PATH%.
</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">Any possible problem?</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">This is a build on gdal 3.4.1.
</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="color:#1F497D">Thanks,</span></p>
<p class="x_MsoNormal"><span style="color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b>From:</b> Even Rouault <even.rouault@spatialys.com> <br>
<b>Sent:</b> Thursday, February 24, 2022 12:54 PM<br>
<b>To:</b> Fengting Chen <fengting.chen@oracle.com>; gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> [External] : Re: [gdal-dev] how to build netCDF driver plugin</p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<p>- The filename is case sensitive: it must be gdal_netCDF.so/dll since the registration function is called GDALRegister_netCDF()<span style="font-size:12.0pt"></span></p>
<p>- You need to set the GDAL_DRIVER_PATH environment variable to point to the directory where the driver is</p>
<p style="margin-bottom:12.0pt">- You might find it easier when using master to use CMake:  cmake -DGDAL_ENABLE_DRIVER_NETCDF_PLUGIN:BOOL=ON  . That will work on both Linux and Windows</p>
<div>
<p class="x_MsoNormal">Le 24/02/2022 à 17:45, Fengting Chen a écrit :</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p class="x_MsoNormal">Under current build system, how to build netCDF driver as a plugin on linux and windows?
</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">On windows, when I set NETCDF_PLUGIN=YES, the gdal_netcdf.ddl was built. But gdalinfo still doesn’t show netcdf as a supported format.
</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">On linux, I changed the local makefile for netcdf and built gdal_netcdf.so. But gdalinfo doesn’t show netcdf as a supported format either.
</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Any help would be appreciated. </p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Thanks</p>
<p class="x_MsoNormal"><span style="font-size:12.0pt; font-family:"Times New Roman",serif"><br>
<br>
</span></p>
<pre>_______________________________________________</pre>
<pre>gdal-dev mailing list</pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a></pre>
<pre><a href="https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!arl8eQzGRDqBZJr6WK8ShQVivQBxsojpL11eSfaFnZOe2MhcbeySDvlb0A2SfGO3X9M$">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<pre>-- </pre>
<pre><a href="https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!arl8eQzGRDqBZJr6WK8ShQVivQBxsojpL11eSfaFnZOe2MhcbeySDvlb0A2SocmiOpw$">http://www.spatialys.com</a></pre>
<pre>My software is free, but my time generally not.</pre>
</div>
</div>
</body>
</html>