1
をコンパイルすることができません。私はVC2015といくつかの入口のFortranコンパイラをインストールして、している私は、次のエラーを持っているcmake
ときCMakeのインテルFortranコンパイラは、私はWindowsでのFortranプロジェクトを準備するためにCMakeのを使用しています簡単なプログラム
-- Check for working Fortran compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/ifc.exe
-- Check for working Fortran compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/ifc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/CMakeTestFortranCompiler.cmake:54 (message):
The Fortran compiler "D:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/ifc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/Dev/plaf/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_f7da8\fast"
"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f
CMakeFiles\cmTC_f7da8.dir\build.make /nologo -L
CMakeFiles\cmTC_f7da8.dir\build
Building Fortran object
CMakeFiles/cmTC_f7da8.dir/testFortranCompiler.f.obj
"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\ifc.exe" -c
D:\Dev\plaf\build\CMakeFiles\CMakeTmp\testFortranCompiler.f -o
CMakeFiles\cmTC_f7da8.dir\testFortranCompiler.f.obj
usage: D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\ifc.exe
[subcommand] [options...]
subcommands:
OBJ Convert an interface file into a dummy object file which can be archived into a static lib.
EMBED Embed an interface file into an existing static lib, producing a new lib.
EXTRACT Extract an embedded interface file from an existing static lib, producing the ifc.
LOCATE Find all embedded interface files and print their offset + size to stdout.
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin\ifc.exe"' : return code '0x1'
エラー(私が間違っているなら、私を修正)の私の理解では、cmakeのは間違ったフラグでコンパイラを使用していることですしたがって、サンプルプログラムのコンパイル時には動作しません。
どうすれば修正できますか?私はコンパイルするためにはMinGWを使用したとき、それは私が起こっ
ののconfigureに代わりのVisual Studioの「MinGWのメイクファイル」を選択することで、あなたは、Visual Studioから意味ならば、はい、私はちょうど新しいハローFORTRAN世界のプロジェクトを作成し、それをコンパイルし、問題なく動作します。 –
CMakeのバージョンは何ですか?時には、新しいバージョンで作業するために何かを調整する必要があります。 – usr1234567
cmake version 3.5.2 –