我正在尝试在Windows下编译Fortran 90程序。我已经在Linux下成功完成了这项工作。
我正在使用'Babun'的windows shell,它基本上是cygwin的包装器:https://github.com/babun/babun
当我尝试运行cmake时,我得到以下内容:
-- The Fortran compiler identification is GNU
-- Check for working Fortran compiler: /usr/bin/gfortran.exe
-- Check for working Fortran compiler: /usr/bin/gfortran.exe -- broken
CMake Error at /usr/share/cmake-2.8.9/Modules/CMakeTestFortranCompiler.cmake:40 (MESSAGE):
The Fortran compiler "/usr/bin/gfortran.exe" is not able to compile a
simple test program.
It fails with the following output:
Change Dir: /cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make.exe "cmTryCompileExec674739544/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec674739544.dir/build.make
CMakeFiles/cmTryCompileExec674739544.dir/build
make[1]: Entering directory
'/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake.exe -E cmake_progress_report
/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp/CMakeFiles
1
Building Fortran object
CMakeFiles/cmTryCompileExec674739544.dir/testFortranCompiler.f.o
/usr/bin/gfortran.exe -c
/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp/testFortranCompiler.f
-o CMakeFiles/cmTryCompileExec674739544.dir/testFortranCompiler.f.o
Linking Fortran executable cmTryCompileExec674739544.exe
/usr/bin/cmake.exe -E cmake_link_script
CMakeFiles/cmTryCompileExec674739544.dir/link.txt --verbose=1
/usr/bin/gfortran.exe -Wl,--enable-auto-import
CMakeFiles/cmTryCompileExec674739544.dir/testFortranCompiler.f.o -o
cmTryCompileExec674739544.exe
-Wl,--out-implib,libcmTryCompileExec674739544.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
gfortran: fatal error: -fuse-linker-plugin, but cyglto_plugin.dll not found
compilation terminated.
CMakeFiles/cmTryCompileExec674739544.dir/build.make:83: recipe for target
'cmTryCompileExec674739544.exe' failed
make[1]: *** [cmTryCompileExec674739544.exe] Error 1
make[1]: Leaving directory
'/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec674739544/fast' failed
make: *** [cmTryCompileExec674739544/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (enable_language)
这个cyglto_plugin.dll
属于哪个包?我错过了什么依赖?
谢谢!