Fortran Salford fortran library compiler error?

AI Thread Summary
The discussion revolves around a user encountering a compilation error while using the Salford Fortran compiler with the NAG Fortran library. After successfully compiling a Fortran program with warnings, the user attempts to run the program but receives an error message indicating "More than one source file specified." This suggests that the command used to compile and link the program is incorrect. A suggested solution is to use the command "ftn95 programname.f95 /link" for linking, although this does not include the NAG library. Additionally, users are advised to consult the online help feature of the compiler for further assistance.
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
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

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