[gdal-dev] Preventing symbol export in custom GDAL build
Andrew Bell
andrew.bell.ia at gmail.com
Wed Dec 10 10:02:22 PST 2025
On Wed, Dec 10, 2025 at 12:55 PM Kai Pastor, DG0YT via gdal-dev <
gdal-dev at lists.osgeo.org> wrote:
> Am 10.12.25 um 17:09 schrieb Andrew Bell via gdal-dev:
>
> Hi,
>
> All symbols that aren't specifically exported should be hidden if when you
> build the flag "-fvisibility=hidden" is set. See
> cmake/helpers/configure.cmake.
>
> I don't think this will help with MSVC and its dllexport declarations.
>
I don't know that this is MSVC. I thought it was a GCC build on Windows,
but regardless, things are essentially the same (on Windows you *must*
export all the symbols you want visible). I don't know spatialite, but
there should be some sort of DLL marker (like CPL_DLL in GDAL) that can be
turned off when building a static library that you then link into GDAL.
This may be helpful:
https://gcc.gnu.org/wiki/Visibility
--
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20251210/1f29095e/attachment-0001.htm>
More information about the gdal-dev
mailing list