linking HDF5 with VS2015 C++ 64-bit only works with static libraries

https://forum.hdfgroup.org/t/linking-hdf5-with-vs2015-c-64-bit-only-works-with-static-libraries/3697

测试例子:hdfgroup 官方的sample:writedata

错误    LNK2001    无法解析的外部符号 "public: static class H5::FileCreatPropList const & const H5::FileCreatPropList::DEFAULT" (?DEFAULT@FileCreatPropList@H5@@2AEBV12@EB)

解决方案见上:在预处理器定义中添加:H5_BUILT_AS_DYNAMIC_LIB

其它设置:

1 代码生成--运行库:多线程 DLL (/MD)

2 链接输入:

hdf5.lib
hdf5_cpp.lib
szip.lib
zlib.lib

你可能感兴趣的:(linking HDF5 with VS2015 C++ 64-bit only works with static libraries)