View previous topic :: View next topic |
Author |
Message |
Jim
Joined: 21 Jul 2006 Posts: 24 Location: USA
|
Posted: Tue Feb 15, 2011 2:50 pm Post subject: Linking separate subroutines with FTN95. |
|
|
How do you compile and link separate subroutines using FTN95 and Plato IDE?
 |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Feb 15, 2011 3:55 pm Post subject: |
|
|
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". |
|
Back to top |
|
 |
Jim
Joined: 21 Jul 2006 Posts: 24 Location: USA
|
Posted: Tue Feb 15, 2011 10:28 pm Post subject: |
|
|
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? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Feb 16, 2011 8:43 am Post subject: |
|
|
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. |
|
Back to top |
|
 |
colt1954
Joined: 21 Dec 2010 Posts: 81
|
Posted: Fri Feb 25, 2011 11:04 am Post subject: Re: |
|
|
Jim wrote: | 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? |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
Posted: Thu Mar 03, 2011 2:59 am Post subject: |
|
|
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. |
|
Back to top |
|
 |
|