PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Preprocess settings don't pass to included files

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



Joined: 20 Jun 2011
Posts: 58

PostPosted: Tue Jun 11, 2013 7:50 am    Post subject: Preprocess settings don't pass to included files Reply with quote

I'm using PGI Visual Fortran 12.5.
I've selected to preprocess source files, but this setting don't get to files, that i include with fortran-style include. Although c-style include works. Example:

commons.inc:
Quote:

#warning Hello


Gives error
Label field of continuation line is not blank
notworks.f95:
Quote:

include 'commons.inc'


works.f95:
Quote:

#include "commons.inc"
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jun 11, 2013 2:02 pm    Post subject: Reply with quote

Hi Senya,

The Fortran "include" statement just copies fortran statements into the body of the source file, it's not a preprocessor. The preprocessing step occurs before this, hence putting C-type preprocessor statements in the included file wont work since these don't get preprocessed. If you need C-style statements, you need to use the C-style include.

- Mat
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