Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cmake HDF5库版本不匹配错误_Cmake_Version_Hdf5_Mismatch - Fatal编程技术网

Cmake HDF5库版本不匹配错误

Cmake HDF5库版本不匹配错误,cmake,version,hdf5,mismatch,Cmake,Version,Hdf5,Mismatch,我从HDF5收到如下错误/警告: Warning! ***HDF5 library version mismatched error*** The HDF5 header files used to compile this application do not match the version used by the HDF5 library to which this application is linked. Data corruption or segmentation faults

我从HDF5收到如下错误/警告:

Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.8.14, library is 1.8.15
所以,我的问题是什么是避免这种情况的最好方法?理想情况下,我希望通过再次构建hdf5来避免它,但这次要确保版本完全匹配,并且它不是从其他地方读取的,尽管我在cmake中明确指定了查找hdf5(hdf5-1.8.5-patch1)的位置,甚至指定了更多的hdf5\u根环境变量

我是这方面的新手,所以如果你能给我简单的指导,那就太好了。即使是指定此标志HDF5\u DISABLE\u VERSION\u CHECK in build time的方法,对我来说也可以


感谢

可能的重复,我以前见过,并尝试过除“从项目中清理对象文件”之外的解决方案,我认为这意味着删除配置文件,对吗?我正在使用Cmake构建项目,并明确定义了在哪里可以找到hdf5。这来自cmake日志:HDF5包含路径:/usr/local/HDF5-1.8.5-patch1/INCLUDE HDF5库:/usr/local/HDF5-1.8.5-patch1/lib/libhdf5.a/usr/lib/libstdc++.dylib/usr/lib/libpthread.dylib/usr/lib/libz.dylib/usr/lib/libdl.dylib/usr/lib/libm.dylib/usr/local/hdf5-1.8.5-patch1/lib/libhdf5_hl.a/usr/local/hdf5-1.8.5-patch1/lib/libhdf5。找到了一个hdf5库
您可以通过将环境变量“HDF5\u disable\u VERSION\u CHECK”设置为值“1”来禁用此警告,风险由您自己承担。
这似乎仅在应用程序(使用Ano+Keras+Anaconda)在Windows中使用PyCharm运行时才会显示,设置
HDF5\u disable\u VERSION\u CHECK=1
会将其禁用。