Code::Blocks Forums

User forums => Help => Topic started by: Farzin on September 26, 2014, 04:14:45 pm

Title: Problem with Fortran codes
Post by: Farzin on September 26, 2014, 04:14:45 pm
hi,
I've used code::blocks 13.12 for months, compiling c++ codes and it worked well.
now i wanted to run a Fortran code but there is a problem:
Quote
mingw32-g++.exe: error: CreateProcess: No such file or directory

I've set GNU Fortran Compiler as default, and correct path is selected for MinGW.
After searching about this, noticed "egcs" problem which some said. i haven't such program. but i found MATLAB has a "gcc" folder...

Can you help me on this?
Title: Re: Problem with Fortran codes
Post by: stahta01 on September 26, 2014, 05:05:17 pm
Does your MinGW GCC compiler have the files to support FORTRAN compiling?

Edit: Code::Blocks is NOT a Compiler!!

Tim S.
Title: Re: Problem with Fortran codes
Post by: Farzin on September 26, 2014, 05:34:41 pm
thank you Tim,

Yes, it is actually the MinGW which being installed with CodeBlocks 13.12 .
I tried to use another gFortran compiler and not that one in CodeBlocks directory, by selecting it's bin files in compiler settings, this time there were errors with Fortran functions.
Title: Re: Problem with Fortran codes
Post by: Farzin on September 27, 2014, 10:25:32 am
Still couldn't figure it out.
Title: Re: Problem with Fortran codes
Post by: gd_on on September 27, 2014, 11:01:28 am
Hi,
when using fortran, you shoud not have a reference to mingw32-g++.
Here is the correct compiler setting.
in toolchain executables you should have :
C compiler : mingw32-gfortran.exe
C++ compiler : mingw32-gfortran.exe
linker : mingw32-gfortran.exe
linker for static : ar.exe
debugger : gdb.exe
resource : windres.exe
make program : mingw32.make.exe

and of course you must select gfortran compiler for your project.

Also, have a look in the wiki : http://wiki.codeblocks.org/index.php?title=Installing_Fortran_Compiler

gd_on
Title: Re: Problem with Fortran codes
Post by: Farzin on September 27, 2014, 07:36:23 pm
Hi,
when using fortran, you shoud not have a reference to mingw32-g++.
Here is the correct compiler setting.
in toolchain executables you should have :
C compiler : mingw32-gfortran.exe
C++ compiler : mingw32-gfortran.exe
linker : mingw32-gfortran.exe
linker for static : ar.exe
debugger : gdb.exe
resource : windres.exe
make program : mingw32.make.exe

and of course you must select gfortran compiler for your project.

Also, have a look in the wiki : http://wiki.codeblocks.org/index.php?title=Installing_Fortran_Compiler

gd_on

Thank you. you're right... I'd chosen wrong bin file for compiler.