Author Topic: initial error  (Read 63 times)

Online return

  • Single posting newcomer
  • *
  • Posts: 3
initial error
« on: Today at 03:58:03 pm »
excuse me, but I am having trouble getting started. I install MinGW fortran on a windows laptop Codeblocks. I am trying a simple print test project and getting error messages.

Checking for existence: C:\Users\fempo\Documents\new projects\hello\main.exe

-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

g++.exe   -c "C:\Users\fempo\Documents\new projects\hello\main.f90" -o "C:\Users\fempo\Documents\new projects\hello\main.o"
Execution of 'g++.exe   -c "C:\Users\fempo\Documents\new projects\hello\main.f90" -o "C:\Users\fempo\Documents\new projects\hello\main.o"' in 'C:\Users\fempo\Documents\new projects\hello' failed.
Checking for existence: C:\Users\fempo\Documents\new projects\hello\main.exe

-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

g++.exe   -c "C:\Users\fempo\Documents\new projects\hello\main.f90" -o "C:\Users\fempo\Documents\new projects\hello\main.o"
Execution of 'g++.exe   -c "C:\Users\fempo\Documents\new projects\hello\main.f90" -o "C:\Users\fempo\Documents\new projects\hello\main.o"' in 'C:\Users\fempo\Documents\new projects\hello' failed.
Checking for existence: C:\Users\fempo\Documents\new projects\hello\main.exe

-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

g++.exe   -c "C:\Users\fempo\Documents\new projects\hello\main.f90" -o "C:\Users\fempo\Documents\new projects\hello\main.o"
Execution of 'g++.exe   -c "C:\Users\fempo\Documents\new projects\hello\main.f90" -o "C:\Users\fempo\Documents\new projects\hello\main.o"' in 'C:\Users\fempo\Documents\new projects\hello' failed.
Checking for existence: C:\Users\fempo\Documents\new projects\hello\main.exe


Can someone help?

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 796
Re: initial error
« Reply #1 on: Today at 05:12:27 pm »
Looks like you have not set up the compiler, follow these instructions.

Also, you should create a project for better results.

Online return

  • Single posting newcomer
  • *
  • Posts: 3
Re: initial error
« Reply #2 on: Today at 06:27:01 pm »
I followed those instructions and Codeblocks has already identified the compiler?

Offline gd_on

  • Lives here!
  • ****
  • Posts: 666
Re: initial error
« Reply #3 on: Today at 07:36:22 pm »
You are trying to compile a fortan source with a C++ compiler. It may work, but it's not the best thing to do.
You should choose for your source and set a gfortran compiler.
Look in the wiki or the documentation how to do that.
Do you use a project ?
« Last Edit: Today at 07:38:00 pm by gd_on »
Windows 10 64 bits (21H1), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 10.3.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Online return

  • Single posting newcomer
  • *
  • Posts: 3
Re: initial error
« Reply #4 on: Today at 07:56:30 pm »
Are you saying Mingw is not gfortran?  Or that I did not install it correctly?
Sorry for being thick.  I learned Fortran on punch cards, then went to Dos 386. After which going to a new job I moved away from programing.  Now I want to work with some of my old programs and get back into it. But setting up the software is trying me.