replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - how do i create the executable when compiling?
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 

how do i create the executable when compiling?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
ijk4



Joined: 24 Sep 2012
Posts: 1

PostPosted: Mon Sep 24, 2012 11:10 pm    Post subject: how do i create the executable when compiling? Reply with quote

I am attempting to compile a f77 code based optimization program called MINOS. First, when I compile the various subroutines, I get alot of warning messages about a variable being declared but not used. Second, when I go to run the program, I get a message about a particular subroutine not able to be located. Third,is there a command I need to use to link all the object code files, or does Plato do that automatically?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8254
Location: Salford, UK

PostPosted: Tue Sep 25, 2012 7:34 am    Post subject: Reply with quote

Warning messages can be ignored.
You will need to find the code for the missing routine.
Plato will do the linking for you if you click on the appropriate button on the toolbar.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2937
Location: South Pole, Antarctica

PostPosted: Thu Sep 27, 2012 8:02 pm    Post subject: Reply with quote

Plato is doing good job but I still compile via batch file.

Will show how i do that and of course i'm ready to learn from all you too. This is old good method where you do not need to remember what and how it was done and requires you ultimately only one single doubleclick or one single ENTER to compile everything. All is self-documented because batch file language is simplest of all languages. This worked 30 years ago, works today and hopefully will work forever.

First, having Total Commander (resembling famous Norton Commander, the free program on the net) is important here for ultimate convenience of working with all files. That is #1 program i install on new OS.

Let's call batch file COMPILING.BAT. Then when you press "Ctrl+Enter n" stepping on the file COMPILING.BAT, the command line will be automatically filled and run

X> COMPILING n

You just type one letter "n" or nothing and use cursor keys, no excessive typing necessary -- why i also like this method.

The batch file may use external parameter for example "n" or "N" and "s" or "S" to direct the compilation with /check ( or /nocheck) and with SDBG debugger or without it. Here are two examples what's inside of batch files.

Code:

if (%1)==(n)     goto nocheck
if (%1)==(N)     goto nocheck

del e.exe
ftn95 E.f95 /debug  /undef /check /free  >e00001
slink e.obj /stack:3000000 >e00002

if (%1)==(s)     goto sdbg
if (%1)==(S)     goto sdbg
e.exe
goto end

:sdbg
sdbg e.exe
goto end

:nocheck
del e.exe
ftn95 E.f95 /nocheck /free   >e00001
slink e.obj /stack:3000000 >e00002
e.exe
goto end

:end


Compilation errors are gathered in the files e00001 and linking errors in e00002

That was hardware type of programming where everything is set in advance and you just chose the path there. Another example uses one more external batch parameter %2 to to follow the same stream of compilation for all options and just tell compiler how to compile more verbose way with /nocheck, /check or /undef or millions others ways. Here several related programs are compiled (like 10 but shown 2) and if you need to recompile just one of them the first batch parameter is used. For example

X> COMPILING a u

will compile only ANGULAR program with checking of all undefined variables ( /checkmate)

If no external parameters used - all programs will be compiled consequently some standard way you decide. You can set also only linking without compilation etc etc etc.

Code:

if (%2)==(n)  set s1=/nocheck /zeroise /statistics
if (%2)==(f)  set s1=/full_debug /check /zeroise /statistics
if (%2)==(u)  set s1=/full_debug /checkmate /zeroise

if (%1)==(a)    goto ANG
if (%1)==(an)   goto ANG
if (%1)==(ang)  goto ANG
if (%1)==(s)    goto SPAT
if (%1)==(sp)   goto SPAT

rem ---------------- compiling Angular
:ANG
ftn95  AngularM.for     %s1%   
ftn95  AngularN.for     %s1%   
ftn95  Angg.for   %s1% 
slink AngularM.obj AngularN.obj Angg.obj >c0002A
if (%1)==(a)   goto END
if (%1)==(an)  goto END
if (%1)==(ang) goto END

rem ---------------- compiling Spatial
:SPAT
ftn95  SpatialA.for       %s1%
ftn95  SpatialB.for       %s1%
ftn95  SpatialC.for       %s1%
ftn95  SpatialD.for       %s1%
slink SpatialA.obj SpatialB.obj SpatialC.obj SpatialD.obj >c0002S
if (%1)==(s)   goto END
if (%1)==(sp)  goto END

rem ---------------- compiling other stuff
:CCC
rem ...

rem ---------------- Linking only, no compilation
:LINK
rem ...

rem ---------------- Linking only with another options, no compilation
:LINK2
rem ...



:END
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 -> General 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