Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29271 Discussions

how include INCLUDEFILE.INC !!! HELP ME!!!!

gambato
Beginner
592 Views

Hi all!!

I need help because I'm writing a program and I want to include a includefile.inc. (var.inc)

which is: integer i,j,n,m

parameter (n=6, m=9)

common/var/ i,j

I included it in this way: Project-->Settings-->Fortran ; in this windows I choose in "category": preprocessor and I wrote in "include and use path" : var.inc

The problem is that the program said to me that it can'tinclude this includefile and then it creates other errors.

What do I have to do??Could you help me, please??

thank you very much

Cri

0 Kudos
2 Replies
Steven_L_Intel1
Employee
592 Views

You need to add to your source file at the place you want this included, the line:

INCLUDE 'var.inc'

The project setting you looked at is to tell the compiler in what directories to look for include files. For that setting, you are supposed to put directory paths only, not full file names. By default, the compiler looks in the same directory as the source file with the INCLUDE line.

0 Kudos
gambato
Beginner
592 Views

Thank you very much for your help!!!smiley [:-)]

0 Kudos
Reply