我创建了一个HDF5文件打开功能类似下面的一个HDF5文件错误:打开
int OpenHDF5(string sFileName)
{
// Check for valid HDF5 file
if (!H5File::isHdf5(sFileName.c_str()))
{
// Invalid HDF5 file
return -1
}
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can handle the errors appropriately
Exception::dontPrint();
// Now Open the file
H5File file(sFileName.c_str(), H5F_ACC_RDONLY);
}
// Catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1
}
return 0
}
没有发生编译错误,但未能有以下例外链接: 链接...
创建库˚F :\ Tips \ Debug \ Tips.lib和对象F:\ Tips \ Debug \ Tips.exp
TwinSatObservation.obj:错误LNK2001:无法解析的外部符号“public:static class H5 :: FileCreatPropList const H5 :: FileCreatPropList :: DEFAULT “(?DEFAULT @ FileCreatPropList @ H5 @@ 2V12 @ B)
TwinSatObservation.obj:错误LNK2001:无法解析的外部符号”pu blic:static class H5 :: FileAccPropList const H5 :: FileAccPropList :: DEFAULT“(?DEFAULT @ FileAccPropList @ H5 @@ 2V12 @ B)
F:\ Tips \ Debug \ Tips.exe:致命错误LNK1120:2个未解析的外部
我添加了以下库的VS 2008链接
hdf5dll.lib
hdf5_hldll.lib
hdf5_cppdll.lib
hdf5_hl_cppdll.lib
的 “Addtional相关性” 的输入框将请您告诉我我忘了添加哪个图书馆?非常感谢你!
对于hdf5_cppdll.lib是10x;) – W55tKQbuRu28Q4xv