PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

compiling multiple files

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
JustinC



Joined: 18 Jan 2013
Posts: 4

PostPosted: Tue Jan 22, 2013 7:24 am    Post subject: compiling multiple files Reply with quote

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
View user's profile
JustinC



Joined: 18 Jan 2013
Posts: 4

PostPosted: Tue Jan 22, 2013 7:51 am    Post subject: Reply with quote

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
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Wed Jan 23, 2013 8:25 am    Post subject: Reply with quote

"*" is a UNIX shell command, not part of the compiler.

- Mat
Back to top
View user's profile
JustinC



Joined: 18 Jan 2013
Posts: 4

PostPosted: Wed Jan 23, 2013 9:39 am    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
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 © phpBB Group