Silverfrost Forums

Welcome to our forums

Linking separate subroutines with FTN95.

15 Feb 2011 1:50 #7751

How do you compile and link separate subroutines using FTN95 and Plato IDE?

😃

15 Feb 2011 2:55 #7752

If all the subroutines are in one file then you can 'build' without creating a 'project'. Otherwise you will need to create a 'project' and add all the files to it using the 'Explorer Window'.

15 Feb 2011 9:28 #7756

All of the subroutines are in one file now but I want to separate them. How does the project determine what the executable name will be?

16 Feb 2011 7:43 #7757

This should be apparent when you go through the process of creating a project. You will also find details in the help file (ftn95.chm) that is accessible from the Help menu in Plato.

25 Feb 2011 10:04 #7837

Quoted from Jim All of the subroutines are in one file now but I want to separate them. How does the project determine what the executable name will be?

I'd of thought that the main 'calling' program would be the executable name surely, or you can at least ensure that it is within the project I guess?

3 Mar 2011 1:59 #7863

If the name of the output executable file is not explicitly specified, the name is of the form <objfileprefix>.EXE, where <objfileprefix> is the prefix of one of the object files being linked.

Since each source can contain more than one routine, there can be more than one subprogram name in the symbol table of each .OBJ file. Furthermore, Fortran allows you to declare a program main routine without the PROGRAM <prog_name> statement being present at all. For these and other reasons, few compilers choose the .EXE name from one of the callable symbols in the objects that are linked.

Please login to reply.