Author Topic: Creating Fortran Project  (Read 786 times)

Offline cfl47

  • Single posting newcomer
  • *
  • Posts: 2
Creating Fortran Project
« on: November 23, 2023, 03:18:48 am »
I am just getting started with codeblocks and trying to create a project for Fortran code.  I go to: create a new project this opens, then I assume I select Fortran Application (which I did) is this correct?  Then I hit go and the Fortran project wizard opens.  It then asks for a Project Title, simple enough, It also asks for folder where the project will reside.  This is where I have a question.  What are the specifics for selecting this folder?  Can I just create a new folder anywhere on my C drive.  My fortran project will also include files which I will be reading information from in the Fortran program and files I want to write information into. Do all these files have to be in some specific folder?.  In the fortran code how do I specifically identify these files to either open, read or write?  When I reference these files for opening do I need to provide the full path and filename?
When I compile the fortran program where is the machine (binary) code stored? Do I have to create a bin subfolder?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1564
Re: Creating Fortran Project
« Reply #1 on: November 23, 2023, 12:07:24 pm »
The folder must be a writeable one; do not use c:\, a system folder or C::B installation folder. A folder under "My documents" is usually fine. Do not use spaces in the folder name.

The include files can be wherever you want, just add them to the compiler search directorioes.

The binary will be stored in the folder you specify in the properties of the project, you can write your output files in that folder. Remeber to set the execution folder to the bin one or your files will be written in the source folder.