I am running Code::Blocks version svn11210 on windows 7 64bit. The compiler I use is Intel Fortran 18 update 1
When I ...
Try to compile a hello world (which compiles fine in the command line), it fails with the following errors
Build log:
-------------- Clean: Debug in Testing (compiler: Intel Fortran Compiler for Windows)---------------
Cleaned "Testing - Debug"
-------------- Build: Debug in Testing (compiler: Intel Fortran Compiler for Windows)---------------
ifort.exe /nologo -Wall -g /Qopenmp /O2 /module:obj\Debug\ /c main.f90 /object:obj\Debug\main.obj
ifort.exe /nologo /exe:bin\Debug\Testing.exe obj\Debug\main.obj /Qopenmp
ifort: command line warning #10157: ignoring option '/W'; argument is of wrong type
ifort: command line error: option '/g' is ambiguous
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 1 warning(s) (0 minute(s), 0 second(s))
It seems that it is passing arguments to ifort with -arg syntax when it wants /arg only, but I can't figure out where these originate from (I've looked through the compiler options for anything weird). If I switch the project to gfortran, it compiles and runs fine. To make ifort work I'm running CB from the following .bat file to set up environment variables:
call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\bin\ifortvars.bat" -arch intel64
call "C:\Program Files (x86)\CodeBlocks\codeblocks.exe"