为了将您放在上下文中,我正在尝试检查一种算法(称为DINEOF),该算法可以填充光栅时间序列中缺失的数据。算法是用Fortran编写的,我学会了在Win10上运行它需要使用MinGW。
目前,我正在尝试遵循这个指导原则:http://modb.oce.ulg.ac.be/mediawiki/index.php/DINEOF_for_Windows,但是,我发现自己正在为这一步而苦苦挣扎:
./configure --disable-netcdf-4 --disable-dap > config.log
make > make.log
make check > check.log
make install错误/警告消息:
$ ./configure --disable-netcdf-4 --disable-dap > config.log
configure: WARNING: Doxygen not found - documentation will not be built
configure: WARNING: dot not found - will use simple charts in documentation
configure: WARNING: netcdf-4 not enabled; disabling DAP4$ make > make.log
In file included from ../include/ncdispatch.h:14:0,
from dparallel.c:9:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
^
make[2]: *** [libdispatch_la-dparallel.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2$ make check > check.log
In file included from ../include/ncdispatch.h:14:0,
from dparallel.c:9:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
^
make[1]: *** [libdispatch_la-dparallel.lo] Error 1
make: *** [check-recursive] Error 1发布于 2021-02-14 19:33:44
您使用的指令是用于构建NetCDF 4.5.0的,但最新版本是4.7.4,它可以使用cmake构建。对我来说,以下是来自http://winlibs.com/的GCC 10.2.0的作品(前提条件是存在):
wget -c https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz
tar xfz netcdf-c-4.7.4.tar.gz
cd netcdf-c-4.7.4
# fix conflicting getopt in include/XGetopt.h
mv include/XGetopt.h include/XGetopt.h.bak &&
echo "#include <getopt.h>" > include/XGetopt.h
cmake.exe -Wno-dev -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=../../netcdf_build -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_DLL:BOOL=ON -DENABLE_DLL:BOOL=ON -DENABLE_CDF5:BOOL=OFF -DENABLE_HDF4:BOOL=ON -DENABLE_XGETOPT:BOOL=OFF -DENABLE_MMAP:BOOL=OFF -DENABLE_LOGGING:BOOL=OFF -DENABLE_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DBUILD_TESTSETS:BOOL=OFF -DENABLE_EXTRA_TESTS:BOOL=OFF -DENABLE_LARGE_FILE_TESTS:BOOL=OFF -DENABLE_FILTER_TESTING:BOOL=OFF -DENABLE_HDF4_FILE_TESTS:BOOL=OFF -DENABLE_TESTS:BOOL=OFF -DENABLE_UNIT_TESTS:BOOL=OFF -DCMAKE_C_FLAGS:STRING="-fcommon" -S. -Bbuild_shared &&
make -Cbuild_shared install/strip &&
echo SUCCESShttps://stackoverflow.com/questions/66016614
复制相似问题