Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.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
Visual studio 在使用CMake的Windows 10上使用英特尔Fortran编译器19.0为Visual Studio 2017构建HDF5库_Visual Studio_Cmake_Visual Studio 2017_Fortran_Hdf5 - Fatal编程技术网

Visual studio 在使用CMake的Windows 10上使用英特尔Fortran编译器19.0为Visual Studio 2017构建HDF5库

Visual studio 在使用CMake的Windows 10上使用英特尔Fortran编译器19.0为Visual Studio 2017构建HDF5库,visual-studio,cmake,visual-studio-2017,fortran,hdf5,Visual Studio,Cmake,Visual Studio 2017,Fortran,Hdf5,我正在尝试使用CMake(版本3.15.5)为VS2017(社区,版本15.9.11)构建HDF5 Fortran库。为此,我已下载了必要的文件,并按照本网站上的说明进行操作: CMake-hdf5-1.10.5.tar.gz文件包含一个CTest脚本,该脚本将自动构建库。与“HDF5options”文件中的默认选项不同的是,我将Build_Fortran Bool设置为on,因为默认设置不会为Fortran构建libs 然后我用命令运行脚本 ctest -S HDF5config.cmake,

我正在尝试使用CMake(版本3.15.5)为VS2017(社区,版本15.9.11)构建HDF5 Fortran库。为此,我已下载了必要的文件,并按照本网站上的说明进行操作:

CMake-hdf5-1.10.5.tar.gz文件包含一个CTest脚本,该脚本将自动构建库。与“HDF5options”文件中的默认选项不同的是,我将Build_Fortran Bool设置为on,因为默认设置不会为Fortran构建libs

然后我用命令运行脚本

ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log
这座大楼已经建成,但并非所有的东西都能正常工作。似乎大多数与Fortran相关的东西都没有正确构建,并且没有通过自动测试。此外,在构建中自动创建的VS项目中,我没有编译任何内容

此处可以看到所有失败的测试:

我在这里上传了整个构建日志。

我不知道我做错了什么。我的目标是用我的硬件和软件用Fortran编写HDF5文件,所以如果有人能提出一个完全不同的解决方案来实现这一点,它也会解决我的问题

编辑:我试着按照一位好心的评论员提供的链接中的建议使用cmake gui,在设置源路径和构建路径后,我让它进行配置,然后我勾选HDF5_build_FORTRAN,其他一切保持原样,让它再次配置。出现以下错误:

SOVERSION: 103.1.0
SOVERSION_TOOLS: 100.1.2
SOVERSION_CXX: 103.1.0
SOVERSION_F: 102.0.0
SOVERSION_HL: 100.1.2
SOVERSION_HL_CXX: 100.1.3
SOVERSION_HL_F: 100.0.4
SOVERSION_JAVA: 100.4.0
Checking for InitOnceExecuteOnce:
Warnings Configuration:
Could NOT find Perl (missing: PERL_EXECUTABLE) 
Cannot generate headers - perl not found
CMake Warning (dev) at CMakeLists.txt:746 (set):
  implicitly converting 'INTEGER' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

The Fortran compiler identification is Intel 19.0.0.20181018
Check for working Fortran compiler: C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/bin/intel64/ifort.exe
Check for working Fortran compiler: C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/bin/intel64/ifort.exe  -- works
Detecting Fortran compiler ABI info
Detecting Fortran compiler ABI info - done
Determine Intel Fortran Compiler Implicit Link Path
Determine Intel Fortran Compiler Implicit Link Path -- done
Checking whether C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/bin/intel64/ifort.exe supports Fortran 90
Checking whether C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019/windows/bin/intel64/ifort.exe supports Fortran 90 -- yes
Detecting Fortran/C Interface
Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
Testing Fortran sizeof
Testing Fortran sizeof - OK
Testing Fortran c_sizeof
Testing Fortran c_sizeof - OK
Testing Fortran storage_size
Testing Fortran storage_size - OK
Testing Fortran ISO_FORTRAN_ENV
Testing Fortran ISO_FORTRAN_ENV - OK
Testing Fortran RealIsNotDouble
Testing Fortran RealIsNotDouble - OK
Testing Fortran iso_c_binding
Testing Fortran iso_c_binding - OK
CMake Warning (dev) at config/cmake_ext_mod/HDFUseFortran.cmake:195 (set):
  implicitly converting 'flags' to 'STRING' type.
Call Stack (most recent call first):
  CMakeLists.txt:826 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at config/cmake_ext_mod/HDFUseFortran.cmake:196 (set):
  implicitly converting 'flags' to 'STRING' type.
Call Stack (most recent call first):
  CMakeLists.txt:826 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Fortran compiler ID is Intel
Testing Fortran c_long_double
Testing Fortran c_long_double - OK
Testing Fortran c_long_double
Testing Fortran c_long_double - Fail
Detecting Fortran REAL and INTEGER KINDs
Testing Fortran REAL and INTEGER KINDs - Fail
CMake Error at config/cmake/HDF5UseFortran.cmake:124 (file):
  file failed to open for reading (No such file or directory):

    C:/ProgramData/HDF5Libs/pac_fconftest.out
Call Stack (most recent call first):
  CMakeLists.txt:835 (include)


CMake Error at config/cmake/HDF5UseFortran.cmake:128 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:835 (include)


CMake Error at config/cmake/HDF5UseFortran.cmake:129 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:835 (include)


CMake Error at config/cmake/HDF5UseFortran.cmake:130 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:835 (include)


CMake Error at config/cmake/HDF5UseFortran.cmake:134 (message):
  Failed to find available INTEGER KINDs for Fortran
Call Stack (most recent call first):
  CMakeLists.txt:835 (include)


Configuring incomplete, errors occurred!
See also "C:/ProgramData/HDF5Libs/CMakeFiles/CMakeOutput.log".
See also "C:/ProgramData/HDF5Libs/CMakeFiles/CMakeError.log".

这--已经有几年了,但可能会提供一些有用的输入。如果可能,请在问题帖子中发布错误的实际文本。请不要只发布链接。@squarekittles我知道,不幸的是,有问题的文本相当长,尤其是构建日志。我将尝试找出哪些部分可能是有趣的,并将其作为文本包含。您在您的计算机上的什么位置(哪个目录)提取了下载的文件?您试图在哪里构建hdf5?错误消息中的路径不常见。代码源位于这样的路径->C:/users/myusername/documents/programs/hdf5something/。。(注意:我的用户名不包含空格,它包含特殊字符,尽管有一个“ö”和一个“-”。我在上传的日志文件中对其进行了审查。我在文档中有一个程序文件夹的原因只是为了存储旧的安装程序等。我第一次尝试构建是在源文件夹的子文件夹中,第二次在C:\programdata\中创建了一个文件夹,称之为HDF5Libs。我现在不能确切地告诉你,因为我正在打电话。但是我注意到路径中没有空格。这个--已经有几年了,但可能会提供一些有用的输入。如果可能,请在问题帖子中发布错误的实际文本。请不要只发布链接。@squarekittles我知道,不幸的是,有问题的文本很长,特别是构建日志。我将尝试找出w帽子部分可能很有趣,并将其作为文本包含。您在计算机上的何处(哪个目录)提取了下载的文件?您试图在何处构建hdf5?错误消息中的路径不同寻常。代码源位于以下路径->C:/users/myusername/documents/programs/hdf5/。。(注意:我的用户名不包含空格,它包含特殊字符,尽管有一个“ö”和一个“-”。我在上传的日志文件中对其进行了审查。我在文档中有一个程序文件夹的原因只是为了存储旧的安装程序等。我第一次尝试构建是在源文件夹的子文件夹中,第二次在C:\programdata\中创建了一个文件夹,称之为HDF5Libs。我现在不能确切地告诉你,因为我正在打电话。但是我注意到小路上没有空隙。