Building shared libraries on Windows is not possible
doedsjarl666 opened this issue · comments
doedsjarl666 commented
There is a problem with building shared libraries with Cmake on Windows.
If BUILD_SHARED_LIBS is ON the following happens:
netcdf-cxx4.dll,
netcdf-cxx4.ilk,
netcdf-cxx4.pbd
are created bu netcdf-cxx4.lib is not, however in the macro add_bin_tests netcdf-cxx4.lib is specifically linked.
The cause of the problem is that there are no exports specified in the sources for netcdf-cxx4 library thus VS does not create a import .lib library.
Yongpeng Zhang commented
yeah, when I use dumpbin /exports .\netcdf-cxx4.lib
to check, I get:
Microsoft (R) COFF/PE Dumper Version 14.32.31329.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file .\netcdf-cxx4.lib
File Type: LIBRARY
Summary
60 .CRT$XCU
120 .bss
19C58 .chks64
4 .data
1124 .data$r
12BA .data$rs
2BF8BC .debug$S
45B11C .debug$T
1CC4 .drectve
4D1C .pdata
20C0 .rdata
55B0 .rdata$r
264 .text$di
300D2 .text$mn
20A0 .text$x
B4 .text$yd
D .voltbl
80CC .xdata
1BA0 .xdata$x
no function exports.
So are there any plans to support it ?