Salford fortran library compiler error?

Click For Summary
SUMMARY

The discussion centers on a compilation error encountered while using the Salford Fortran compiler (FTN95) with the NAG Fortran library. The user successfully compiles a Fortran program but faces an error stating "More than one source file specified" when attempting to run the program. The solution provided suggests using the command "ftn95 ProgramName.f95 /link" to resolve the issue, although it does not link the NAG library. Additionally, users are encouraged to utilize the FTN95 online help feature for further assistance.

PREREQUISITES
  • Familiarity with Salford Fortran Compiler (FTN95)
  • Understanding of NAG Fortran library integration
  • Basic command line usage in Windows
  • Knowledge of Fortran programming syntax
NEXT STEPS
  • Research FTN95 command line options for linking libraries
  • Explore NAG Fortran library documentation for integration techniques
  • Learn about common Fortran compilation errors and their resolutions
  • Investigate alternative Fortran compilers and their features
USEFUL FOR

This discussion is beneficial for Fortran developers, particularly those using the Salford Fortran compiler and the NAG library, as well as anyone troubleshooting compilation errors in Fortran programs.

jcang
Messages
2
Reaction score
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


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
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 17 ·
Replies
17
Views
7K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
8K
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
14
Views
3K