Closed shawnlaffan closed 1 year ago
Update: Affects gcc 11, 12 and 13.
Just some random thoughts - no need to respond. It looks that libnetcdf.dll.a is supposed to resolve those references.
However, I would have expected the references it defines to be prefixed with _imp\
.
Are they ? (Don't be afraid to just open the file libnetcdf.dll.a in notepad and do a text search for those undefined reference
symbols..)
Those undefined references suggest static symbols to me. Is there a static lib (libnetcdf.a) that you can link to instead ?
The libnetcdf.a that shipped with Strawberry-5.32.1 contained both decorated and undecorated symbols - eg. both free_NCList
and __imp_free_NCList
.
Cheers, Rob
The list is below, extracted using the strings
utility.
So it would seem several symbols are not defined.
&8libnetcdf_19___dll_iname
_head_libnetcdf_19___dll
getmountpoint
__imp_getmountpoint
NCJunparse
__imp_NCJunparse
NCJreclaim
__imp_NCJreclaim
NCJparsen
__imp_NCJparsen
NCJparse
__imp_NCJparse
NCJnewstringn
__imp_NCJnewstringn
NCJnewstring
__imp_NCJnewstring
NCJnew
__imp_NCJnew
NCJinsert
__imp_NCJinsert
NCJdump
__imp_NCJdump
NCJdictget
__imp_NCJdictget
NCJcvt
__imp_NCJcvt
NCJclone
__imp_NCJclone
NCJappend
__imp_NCJappend
NCJaddstring
__imp_NCJaddstring
The CI runs for netcdf had the answer.
Adding -Wl,--export-all-symbols
to LDFLAGS gets all tests to pass.
PR coming soon.
Need to check if this manifests with other gcc compiler versions.
netcdf is also now at version 4.9.2 and MSYS2 are applying some additional build options. https://github.com/msys2/MINGW-packages/commit/8d0bb1753bb2b303ce02a299f06c0735ffb5a5ce