<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Tamas,</p>
<p>I would just do:<br>
</p>
<p>- do a GDAL build with the MSSQLSpatial driver built-in with the
generic ODBC driver: -DOGR_ENABLE_DRIVER_MSSQLSPATIAL_PLUGIN=OFF
-DGDAL_USE_MSSQL_ODBC=OFF -DGDAL_USE_MSSQL_NCLI=OFF<br>
</p>
<p>- build it as plugin with MSSQL_ODBC: run cmake again with
-DOGR_ENABLE_DRIVER_MSSQLSPATIAL_PLUGIN=ON
-DGDAL_USE_MSSQL_ODBC=ON -DGDAL_USE_MSSQL_NCLI=OFF<br>
</p>
<p>- build it as plugin with MSSQL_NCLI: run cmake again with
-DOGR_ENABLE_DRIVER_MSSQLSPATIAL_PLUGIN=ON
-DGDAL_USE_MSSQL_ODBC=OFF -DGDAL_USE_MSSQL_NCLI=ON</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 06/02/2023 à 20:44, Tamas Szekeres a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CACALY+QT1U6m3SOh=Y4p5t9AjPcA+MHSE7HVEYbtbU54MXpW2Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi GDAL Devs,
<div><br>
</div>
<div>The GISInternals build SDK has been changed to use GDAL
3.6.x and therefore it has completely switched to the cmake
build. We noticed that this change caused to break the
appveyor builds for MapServer (with the error: Unable to find
driver `MSSQLSpatial' ).<br>
Formerly the MSQLSpatial driver has been built into GDAL by
default using the legacy ODBC driver, but we could also
compile plugin builds against the <b>SQL Server Native Client</b>
and the new <b>SQL Server ODBC 17</b> driver, too. If either
of the plugins was installed with GDAL, the plugin driver
(with the same name) superseded the functionality of the built
in driver.</div>
<div>With the cmake build - however - if we compile a plugin
build (and only one driver is supported) the built in driver
is not compiled anymore.</div>
<div><br>
</div>
<div>The problem with the current solution is that neither the
native client nor the ODBC 17 drivers are installed on Windows
by default and these drivers require additional installations.
When we install these plugins with GDAL, it may cause a
failure when the driver is loaded that the the related ODBC
driver dll-s couldn't be found on the system.</div>
<div><br>
</div>
<div>Would that be possible somehow to restore the original
behavior for example by modifying the cmake build setup for
MSSQLSpatial, so that we could create a built-in driver as
well as one or more plugin drivers (against different ODBC
drivers) within the same cmake configuration? I guess it would
somewhat require to add multiple <b>add_library</b> entries in
the cmake setup, but I'm not sure how that fits into the
current <b>add_gdal_driver</b> ecosystem.</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
<div><br>
</div>
<div> </div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<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>