Salford fortran library compiler error?

In summary, The user is experiencing a compiler error when trying to use the NAG Fortran library with the Salford Fortran compiler. They have received some warnings, but do not believe they will affect the result. However, when trying to run the program, they are getting an error that says more than one source file is specified and compilation has failed. They are asking for help on how to solve this issue and have been advised to use specific FTN95 options.
  • #1
jcang
2
0
Salford fortran library compiler error??

Dear all,

I have install the NAG fortran library, firstly, I compile the fortran program by using the
Salford Fortran compiler with NAG static Lib. Command Prompt
by typing
ftn95 -c ProgramName.f95

It got a few warning, not error. But I think those warning would not effect on the result.

After that, I try to run this program by typing:
ftn95 ProgramName.f95 -o H.exe

But it occur:

***More than one source file specified
1 error [ProgramName.f95] - Compilation failed.

What error is this?
And How can i solve it?

Thanks for any reply.
 
Technology news on Phys.org
  • #2


You need to use FTN95 options :)

ftn95 programname.f95 /link

Is probably what you want. That will not link in the NAG library though. You can launch the online help with

ftn95 /help
 

FAQ: Salford fortran library compiler error?

What is the Salford Fortran library compiler error?

The Salford Fortran library compiler error is an error that occurs when the Salford Fortran compiler encounters a problem while compiling code. It could be caused by a syntax error, missing files, or incompatible code.

How do I fix a Salford Fortran library compiler error?

To fix a Salford Fortran library compiler error, you will need to carefully review your code and look for any syntax errors or missing files. You may also need to check for compatibility issues with the Salford Fortran compiler. It may also help to consult the Salford Fortran documentation or seek assistance from a Fortran expert.

Can a Salford Fortran library compiler error be caused by a computer's operating system?

Yes, a Salford Fortran library compiler error can be caused by a computer's operating system. The Salford Fortran compiler may not be compatible with certain operating systems, so it is important to check the compatibility requirements before using it.

Are there any common mistakes that can lead to a Salford Fortran library compiler error?

Yes, there are some common mistakes that can lead to a Salford Fortran library compiler error. These include using incorrect syntax, not including all necessary files, or using incompatible code. It is important to carefully review your code and follow the guidelines provided by Salford Fortran to avoid these errors.

How can I prevent a Salford Fortran library compiler error?

To prevent a Salford Fortran library compiler error, it is important to carefully review your code and follow the guidelines provided by Salford Fortran. You should also ensure that the Salford Fortran compiler is compatible with your operating system and that all necessary files are included. It may also help to seek assistance from a Fortran expert or consult the Salford Fortran documentation.

Similar threads

Replies
25
Views
2K
Replies
5
Views
1K
Replies
2
Views
2K
Replies
16
Views
2K
Replies
17
Views
5K
Replies
6
Views
1K
Replies
2
Views
7K
Replies
4
Views
2K
Back
Top