打开HDF5文件错误
Open an HDF5 file error
创建了一个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:TipsDebugTips。lib和对象F:TipsDebugTips.exp
TwinSatObservation。obj:错误LNK2001:未解析的外部符号"public: static class H5::FileCreatPropList const H5::FileCreatPropList::DEFAULT" (?DEFAULT@FileCreatPropList@H5@@2V12@B)
TwinSatObservation。obj:错误LNK2001:未解析的外部符号"public: static class H5::FileAccPropList const H5::FileAccPropList::DEFAULT" (?DEFAULT@FileAccPropList@H5@@2V12@B)
F:TipsDebugTips.exe:致命错误LNK1120: 2个未解析的外部
我在VS 2008链接器的"附加依赖项"输入框中添加了以下库
hdf5dll。自由
hdf5_hldll。自由
hdf5_cppdll。自由
hdf5_hl_cppdll.lib
你能告诉我我忘记添加了哪个库吗?非常感谢!
对于VS2010或VS2015的hdf5-1.8.17,将H5_BUILT_AS_DYNAMIC_LIB
定义为预处理器设置(Project> Properties> C/c++> preprocessor> preprocessor Definitions)对我来说完全相同的症状。感谢原帖
在预处理器定义输入框中添加HDF5CPP_USEDLL;_HDF5USEDLL_;
。
- 用MacOS Mojave编译C++:致命错误:mpi.h:没有这样的文件或目录
- 多个文件的内存分配错误"在抛出 'std :: bad_alloc' what (): std :: bad_alloc 的实例后终止调用" [C++]
- 如何在文件和行号中抛出错误
- 防止在C++中选择错误文件时提升 xml 解析器崩溃
- AMQP-CPP >处理程序中的错误文件描述符
- Xcode OSX上的C++构建失败,出现多个错误文件IO..不可用:在macOS 10.15中引入
- 为什么生成文件返回 g++: 错误: h 文件或目录 make: *** [生成文件:12: 测试] 错误 1?
- 警告:打开错误文件(/build/opencv/modules/videoio/src/cap_ffmpeg_impl.
- Ubuntu C++ 编译器错误: g++: 错误: 文件.cpp: 没有这样的文件或目录
- main.cc:5:30:致命错误:文件夹/file.h:没有这样的文件或目录
- C++ LNK2005"已定义"错误 - 文件引用自身
- C++:模拟餐饮公司计费程序-无法将错误数据输出到错误文件
- 博兰德C++链接器错误c文件包括
- Visual Studio 2015 代码覆盖率错误文件
- 使用system()与Gnuplot进行绘图会导致错误:文件不可读
- 是否存在fseek/ftell可能给出错误文件大小的情况
- g++编译错误.h文件
- c++编译错误:.o文件未找到
- 打开错误文件的错误消息
- Ndk-build输出添加符号错误.文件格式错误