From: mecej4 on 4 Jun 2010 12:10 On 6/4/2010 11:03 AM, ritchie31 wrote: > On Jun 3, 4:29 pm, Sjouke Burry<burrynulnulf...(a)ppllaanneett.nnll> > wrote: >> ritchie31 wrote: >>> I have a program that uses many units for example main.f, unit1.f, >>> unit2.f, unit3.f, etc. After I compile them I generate an executable >>> run.exe. >>> I wanted to run many cases using different runs like run1.exe, >>> run2.exe, run3.exe. >> >>> how can I do that? >> >>> Thanks >> >> each time produce run.exe, then: ren run.exe runXX.exe >> or: copy run.exe runXX.exe > > I generate many unit1.o which is linked with run1.exe, Do I have to > rename those units.o too per each correspondent runs.exe?? Either you have misstated your goals or I don't understand what you wrote: usually, one does not run the linker on a .EXE file, because the latter is the result of having completed the linking of a number of .o and .lib files. Often, there are no symbols left in the .EXE to link anything else to. If you describe in more detail what you want to do, maybe someone can direct you towards a solution. -- mecej4
From: dpb on 4 Jun 2010 12:22 ritchie31 wrote: .... > I use Makefile in UNIX which link main.f with a set of units, > generating run.exe and unit1.o unit2.o unit3.o, etc... > Do I have to rename every unit.o with run1234.exe every time I compile > my units ? If I understand what you're asking, you need a makefile to generate each target that contains different object modules. I don't know what the difference(s) are between the various versions, but rather than creating so many different executables, I'd be thinking about whether I couldn't, instead, simply add logic and/or subroutines into a single code base and use input variables to control the execution of the desired code instead. --
From: Louis Krupp on 4 Jun 2010 13:38 On 6/4/2010 10:07 AM, ritchie31 wrote: > On Jun 4, 5:50 am, Louis Krupp<lkrupp_nos...(a)indra.com.invalid> > wrote: >> On 6/3/2010 3:16 PM, ritchie31 wrote: >> >>> I have a program that uses many units for example main.f, unit1.f, >>> unit2.f, unit3.f, etc. After I compile them I generate an executable >>> run.exe. >>> I wanted to run many cases using different runs like run1.exe, >>> run2.exe, run3.exe. >> >>> how can I do that? >> >>> Thanks >> >> I'm going to make a guess about what you're really asking: >> >> You want to compile unit1.f to generate unit1.o (or unit1.obj, or >> whatever), unit2.f to generate unit2.o, and so on. >> >> You want to compile main.f and link with unit1.o to generate run1.exe. >> >> You want to compile main.f and link with unit2.o to generate run2.exe. >> >> Etc. >> >> How you do this will depend on your operating system and compiler; with >> that information, someone here will be able to help you. How do you >> compile and link programs currently? >> >> Louis > > I use Makefile in UNIX which link main.f with a set of units, > generating run.exe and unit1.o unit2.o unit3.o, etc... > Do I have to rename every unit.o with run1234.exe every time I compile > my units ? I don't understand what you're asking. Can you post your Makefile? Louis
First
|
Prev
|
Pages: 1 2 Prev: optimized code crashes under ifort Next: Assumed-shape array of variable-length strings |