replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Some error messages
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some error messages

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
jill.blouse



Joined: 13 Nov 2012
Posts: 4

PostPosted: Wed Nov 14, 2012 9:35 am    Post subject: Some error messages Reply with quote

Hi, I am totally new in the FORTRAN world and therefore understanding this language together with some warnings and error messages becomes harder and harder.
I tried to find the meaning of different errors, but was not successful enough.
After starting the compiling, I got the only red-error message as "*** No main program supplied" and the compilation failed without showing any result.

What should I do? what is the problem?
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Wed Nov 14, 2012 9:51 am    Post subject: Reply with quote

You need one and only one main program.

Here is a template for a working program

Code:

! External subroutine, not in a module
SUBROUTINE AAA()
END SUBROUTINE AAA

! Module with subroutine
MODULE XXX
CONTAINS
   SUBROUTINE BBB
   END SUBROUTINE BBB
END MODULE XXX

! Main program
PROGRAM NNN
   USE XXX, ONLY: BBB
   CALL AAA
   CALL BBB
END PROGRAM NNN

_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
jill.blouse



Joined: 13 Nov 2012
Posts: 4

PostPosted: Wed Nov 14, 2012 10:13 am    Post subject: Reply with quote

Thanks, but the point is that I need just to write one subroutine. I am going to use it later in another software. I mean to say that, I do not have any program. It is just one subroutine and thats all. Does FTN95 compile just one subroutine without any program?
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Wed Nov 14, 2012 11:38 am    Post subject: Reply with quote

I see.

Are you using Plato, FTN95 Express (the free Visual studio Shell plug in), or the command line?

In Plato Build>Compile or Control-F7 compiles without trying to link to create a program. This will produce a .OBJ file that can be linked to your program later.

Are you going to supply your subroutine as source code for the other software? If so this is all you need to do to check it will compile. However, you may want to write a simple main program which calls the subroutine so you can test it.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
jill.blouse



Joined: 13 Nov 2012
Posts: 4

PostPosted: Wed Nov 14, 2012 1:26 pm    Post subject: Reply with quote

Thanks david Smile good idea Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group