PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Compiler directives in Include files don't work

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



Joined: 14 Mar 2012
Posts: 1

PostPosted: Tue Oct 15, 2013 10:33 pm    Post subject: Compiler directives in Include files don't work Reply with quote

Hi, I can't seem to be able to use compiler directives such as #ifdef, #else, #endif, etc. in Include files. They work in my main code but not in my Include file (eg. Fred.FI) that I am including with a statement like INCLUDE 'Fred.FI'

Is this some way around this?
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Oct 16, 2013 6:10 am    Post subject: Reply with quote

Hi Peter,

Try using "#include" instead of "include". The C "#include" should be processed at same time as the other C preprocessor directives, while if I remember correctly, the Fortran "include" gets copied into the main source after this step.

- 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