| View previous topic :: View next topic |
| Author |
Message |
JustinC
Joined: 18 Jan 2013 Posts: 4
|
Posted: Tue Jan 22, 2013 7:24 am Post subject: compiling multiple files |
|
|
This seems like it would be so simple, but yet it doesn't seem to work and I cannot find instructions for this anywhere.
All I want to do is compile all files with a .FOR extension in a directory. Every time I try using:
pgfortran -c *.FOR
I get this result:
PGF90-F-0002-Unable to open source input file: *.FOR
PGF90/x86 Windows 12.10-0: compilation aborted
Is there some other way I should be batch compiling? I have over 1700 files that need to be compiled into a static library and really don't want to write a windows batch file with the name of each file listed.
Thanks for your help!
Justin |
|
| Back to top |
|
 |
JustinC
Joined: 18 Jan 2013 Posts: 4
|
Posted: Tue Jan 22, 2013 7:51 am Post subject: |
|
|
I figured out how to batch process using a batch file:
for /f %%f in ('dir /b c:\<folder path>\*.FOR') do pgfortran -c %%f
I guess I'm still surprised that simply using *.FOR in the pgfortran command wouldn't work. |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Wed Jan 23, 2013 8:25 am Post subject: |
|
|
"*" is a UNIX shell command, not part of the compiler.
- Mat |
|
| Back to top |
|
 |
JustinC
Joined: 18 Jan 2013 Posts: 4
|
Posted: Wed Jan 23, 2013 9:39 am Post subject: |
|
|
Interesting. I noticed that the command worked in Cygwin, but strange that all the other Fortran compilers that I have been testing handled the command in the Windows cmd prompt. Also, after I use the batch script to compile, I can use the Microsoft Library Manager to create a static library in the same cmd prompt using:
lib /out:<name_of_library>.lib *.obj
and it works just fine. Oh well, I have a path forward on that item, on to bigger and better problems... see my post on DATE_AND_TIME intrinsic link problems.
Justin C. |
|
| Back to top |
|
 |
|