Author Topic: Problem with Fortran codes  (Read 7028 times)

Offline Farzin

  • Single posting newcomer
  • *
  • Posts: 4
Problem with Fortran codes
« 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Problem with Fortran codes
« Reply #1 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Farzin

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problem with Fortran codes
« Reply #2 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.

Offline Farzin

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problem with Fortran codes
« Reply #3 on: September 27, 2014, 10:25:32 am »
Still couldn't figure it out.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: Problem with Fortran codes
« Reply #4 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
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline Farzin

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problem with Fortran codes
« Reply #5 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.
« Last Edit: September 27, 2014, 11:18:12 pm by Farzin »