F95 Compiler Question: Linking & Execution

  • Thread starter globox
  • Start date
  • Tags
    Compiler
In summary: The Fortran compiler has options for specifying the conditions around and how real type variables are promoted to real type variables.
  • #1
globox
3
0
Hi guys,

I am thoroughly unfamiliar with the fortran, but I have to use a software that based on f95 codes.

In the user manual of the software it says that, this software involves compilation and linking of the following code segments and in the following order:

a.f95
b.f95
c.f95
d.f95
main.f95

... etc.

So, i am using win7 and plato software for the compilation process but i could not figure out the linking and the compilation process.

Can anyone tell me how to link these codes and execute the program?
Or can anyone suggest me another compilation program for f95?

Any help will be appreciated.

Looking forward to hear from you :)
 
Technology news on Phys.org
  • #2
Does the software not come with a makefile (or whatever the Windows equivalent is)? If not, you'd probably be better off asking Silverfrost, if you can't find an answer in the documentation. Of course, you might want to contact the author of the software, too.
 
  • #3
Yeap the software does not have makefile and as the software is a freeware i do not think that the supplier of the software will help for the execution of the program.

I will check documentation right now, but most probably i will not be able to solve the problem :(

Anyway, thank you
 
  • #4
With the freeware (gnu) g95 Fortran compiler I think you can just give it all the files you want to link on the command line. As in,

g95 a.f95 b.f95 c.f95 d.f95 main.f95 -o whatever.exe

Or you can compile the modules a,b,c and d to object files first. As in,
g95 -c a.f95 -o a.obj
and similarly for b,c and d

Then use
f95 a.obj b.obj c.obj d.obj main.f95 -o whatever.exe
 
  • #5
ok, another question:

In compiling the codes the following options must be specified:
(1) Fixed format source code (72 columns)
(2) Automatically promote REAL type variables to REAL (KIND = 8)
(double precision)

which fortran software enables specifying the conditions abobe and how?
 

1. What is an F95 compiler?

An F95 compiler is a program that translates source code written in the Fortran 95 programming language into machine code that can be executed by a computer.

2. What is the purpose of linking in an F95 compiler?

Linking is the process of combining different object files and libraries to create an executable program. In an F95 compiler, linking is necessary to resolve any external references in the code and create a single, executable file.

3. How does an F95 compiler handle errors during compilation?

An F95 compiler has a built-in error handling system that will identify and report any errors or warnings during the compilation process. These errors can range from syntax errors to more complex issues such as type mismatches or undeclared variables.

4. What is the difference between static and dynamic linking in an F95 compiler?

Static linking involves linking libraries directly into the executable file, meaning that all necessary code is included in the final program. In contrast, dynamic linking involves linking to external libraries at runtime, allowing for more flexibility and smaller executable files.

5. How do you execute a program compiled with an F95 compiler?

To execute a program compiled with an F95 compiler, you simply need to run the resulting executable file. This can be done by double-clicking on the file or using the command line to navigate to the file's directory and typing in its name.

Similar threads

Replies
6
Views
1K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
4
Views
4K
  • Programming and Computer Science
Replies
14
Views
4K
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
17
Views
4K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
2
Views
9K
  • Computing and Technology
Replies
8
Views
2K
Back
Top