Author Topic: initial error  (Read 8413 times)

Offline return

  • Single posting newcomer
  • *
  • Posts: 7
initial error
« on: October 23, 2021, 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

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: initial error
« Reply #1 on: October 23, 2021, 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.

Offline return

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

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: initial error
« Reply #3 on: October 23, 2021, 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: October 23, 2021, 07:38:00 pm by 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 return

  • Single posting newcomer
  • *
  • Posts: 7
Re: initial error
« Reply #4 on: October 23, 2021, 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.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: initial error
« Reply #5 on: October 24, 2021, 01:38:16 am »
I would head on over to the CB Fortran web site below and start with the info on the site. The Fortran devs do not always check out the main C::B fourms and most of the devs are C/C++.

https://cbfortran.sourceforge.io/


Offline return

  • Single posting newcomer
  • *
  • Posts: 7
Re: initial error
« Reply #6 on: October 24, 2021, 02:07:45 pm »
My understanding is that I need a Fortran package and an editor package.  Mingw is fortran and codeblocks is the editor; Yes? What are you saying need?
On the site you listed I don't see anything to download.

Offline return

  • Single posting newcomer
  • *
  • Posts: 7
Re: initial error
« Reply #7 on: October 24, 2021, 02:19:02 pm »
I am looking at this site now
https://web.archive.org/web/20200203140655/https://osdn.net/projects/mingw/releases/
If I click on this; will it provide all I need? (which is located just above the "download package list")
mingw-get-setup.exe(Date: 2017-09-06, Size: 91.00 KB)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: initial error
« Reply #8 on: October 24, 2021, 02:40:38 pm »
The site you mention is a copy of the original wiki, which unfortunately does not work correctly. This copy has not the full funtionalities.
Nevertheless, read the documentation in https://www.codeblocks.org/user-manual/, probably the pdf format https://www.codeblocks.org/docs/manual_codeblocks_en.pdf, and more specifically chapter 5 and 5.2.
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 AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: initial error
« Reply #9 on: October 25, 2021, 01:59:36 am »
On the CB Fortran web site I posted previously are links to the following that I expect will help you out:
1. CBFortran Forum link
2. Sourceforge CBFortran link

You are better asking for fortran help in the CBFortran Forum after you download the relevant file(s) from the Sourceforge CB Fortran files page and search the CBforum to see if you can see if the problem you are having has already been discussed.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: initial error
« Reply #10 on: October 26, 2021, 12:01:41 am »
@Return Yes CBFortran forum is the Code::Block Fortran Forum, which is run by the Fortran plugin developer. It is completely different to any of the forums on this site.


Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: initial error
« Reply #11 on: October 26, 2021, 03:36:58 am »
@return. I will spell it out:

For help:
1. Open the https://cbfortran.sourceforge.io/ URL
2. Search for "forum".
3. Click on the link.
4. Read up and ask for help on the CB Fortran forum that openned in 3. above

Try the latest CB Fortan Plugin:
1. Open the https://cbfortran.sourceforge.io/ URL
2. Search for "Sourceforge"
3. Click on the link.
4. On the sourceforge page click on the "Files" tab text
5. On the files tab click on the "CBFortran_v1.8" text
6. In the  "CBFortran_v1.8" sub tab page download the applicable file for your OS.
7. Unfortunately the rest of the steps I am guessing:
   7a. Unzip the windows file into a new directory
   7b. Run the C:B exe unzipped
   7c. Follow the tutorials and info on the https://cbfortran.sourceforge.io/  page to get started
8. If 7. failed ask in the CB fortran forum for help.

PS. I will not respond to you PM's as other fortran newbies may search C::B forum and find this thread ans as such the info for them needs to be public.


Offline return

  • Single posting newcomer
  • *
  • Posts: 7
Re: initial error
« Reply #12 on: October 27, 2021, 09:45:48 pm »
Thank you. I now have it running.