私はCMakeをWindows上で動かそうとすると完全に迷っているように感じます。 FortranとCのファイルを持つプロジェクト(ECCODES)があります。私はCMakeを使わないとFortranファイルをコンパイルできます。しかし、このプロジェクトには大量のCMakeファイルが付属していました。私は以下のエラーを見て、 "CMakeを使用していないときにFortranファイルをコンパイルすることはできますが、I(CMake)は単純なFortranプログラムをコンパイルできません。誰もがこれを理解できますか?私はmingw64を使用しようとしているので、私はこのプロジェクトでcygwinをWindowsビルドに使用することはできません。 Mac OS XおよびGNU/Linuxでは、私はgfortran
のtdm-gcc
Windowsの64ビット版ビルドを使用していた、CMakeを使用してWindows/MinGW上でコンパイルするための基本的なFortranファイルを取得するにはどうすればよいですか?
Error:The Fortran compiler "c:/gcc-5.1.0-tdm64-1-fortran/bin/gfortran.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/knauthg/.CLion2016.1/system/cmake/generated/ECCodes-45f4e5f3/45f4e5f3/__default__/CMakeFiles/CMakeTmp
Run Build Command:"C:/mingw64/bin/mingw32-make.exe" "cmTC_93cb8/fast"
C:/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_93cb8.dir\build.make CMakeFiles/cmTC_93cb8.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/knauthg/.CLion2016.1/system/cmake/generated/ECCodes-45f4e5f3/45f4e5f3/__default__/CMakeFiles/CMakeTmp'
Building Fortran object CMakeFiles/cmTC_93cb8.dir/testFortranCompiler.f.obj
c:\gcc-5.1.0-tdm64-1-fortran\bin\gfortran.exe -c C:\Users\knauthg\.CLion2016.1\system\cmake\generated\ECCodes-45f4e5f3\45f4e5f3\__default__\CMakeFiles\CMakeTmp\testFortranCompiler.f -o CMakeFiles\cmTC_93cb8.dir\testFortranCompiler.f.obj
CMakeFiles\cmTC_93cb8.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_93cb8.dir/testFortranCompiler.f.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_93cb8.dir/testFortranCompiler.f.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/knauthg/.CLion2016.1/system/cmake/generated/ECCodes-45f4e5f3/45f4e5f3/__default__/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_93cb8/fast' failed
mingw32-make.exe: *** [cmTC_93cb8/fast] Error 2
CMake will not be able to correctly generate this project.