- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my project sources are spread over many different directories. In all these directories there are includefiles that are used by the sources in that same directory.
According to the HELP-manual includefiles that reside in the same directory as the sources should be found directly.
Searching for Include and .mod Files
Directories are searched for include files in this order:
1. Directory of the source file that contains the include.
Well, it does not.
The default Include and Use Path is set to "Source File Directory"
Can you please help me solving this problem.
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Project-specific:
Configuration properties/Fortran/Preprocessor/Additional include directories
(preferrably use paths relative to the .vfproj file, e.g. ../OtherProject/Include )
Permanent (for all current and future projects):
Tools/Options/Intel Fortran/Includes
(must use full paths here)
Configuration properties/Fortran/Preprocessor/Additional include directories
(preferrably use paths relative to the .vfproj file, e.g. ../OtherProject/Include )
Permanent (for all current and future projects):
Tools/Options/Intel Fortran/Includes
(must use full paths here)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I misread your post -- I thought you were asking how to include files from different directories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's supposed to work as documented. Please submit a problem report to Intel Premier Support and attach a ZIP of your project including all folders with source files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve thanks for your answer and sorry for not being complete in my problem description.
Includefiles are found in de "Source File Directory" (as should be) if I specify them directly in my sourcecode.
But in my sourcecode the includefiles should be found in a part of the code with preprocessor lines eg:
subroutine Sub2
implicit none
include "incl2.fi"
#ifdef UNIX
# include "incl3.fi"
#else
# include "incl4.fi"
#endif
print *, 'Hello World from Sub2'
end subroutine Sub2
The compiler can find incl2.fi but it can't find incl4.fi.
incl2.fi and incl3.fi reside both in the same directory as the sourcecode.
Preprocessor: Yes
Default Include and Use path: Source File Directory
I hope you can help,
Kind regards,
Wilco de Vries.
>In my project sources are spread over many different directories. In all these directories >there are includefiles that are used by the sources in that same directory.
>According to the HELP-manual includefiles that reside in the same directory as the >sources should be found directly.
>Searching for Include and .mod Files
>Directories are searched for include files in this order:
>1. Directory of the source file that contains the include.
>Well, it does not.
>The default Include and Use Path is set to "Source File Directory"
>Can you please help me solving this problem.
Includefiles are found in de "Source File Directory" (as should be) if I specify them directly in my sourcecode.
But in my sourcecode the includefiles should be found in a part of the code with preprocessor lines eg:
subroutine Sub2
implicit none
include "incl2.fi"
#ifdef UNIX
# include "incl3.fi"
#else
# include "incl4.fi"
#endif
print *, 'Hello World from Sub2'
end subroutine Sub2
The compiler can find incl2.fi but it can't find incl4.fi.
incl2.fi and incl3.fi reside both in the same directory as the sourcecode.
Preprocessor: Yes
Default Include and Use path: Source File Directory
I hope you can help,
Kind regards,
Wilco de Vries.
>In my project sources are spread over many different directories. In all these directories >there are includefiles that are used by the sources in that same directory.
>According to the HELP-manual includefiles that reside in the same directory as the >sources should be found directly.
>Searching for Include and .mod Files
>Directories are searched for include files in this order:
>1. Directory of the source file that contains the include.
>Well, it does not.
>The default Include and Use Path is set to "Source File Directory"
>Can you please help me solving this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve thanks for your answer and sorry for not being complete in my problem description.
Includefiles are found in de "Source File Directory" (as should be) if I specify them directly in my sourcecode.
But in my sourcecode the includefiles should be found in a part of the code with preprocessor lines eg:
subroutine Sub2
implicit none
include "incl2.fi"
#ifdef UNIX
# include "incl3.fi"
#else
# include "incl4.fi"
#endif
print *, 'Hello World from Sub2'
end subroutine Sub2
The compiler can find incl2.fi but it can't find incl4.fi.
incl2.fi, incl3.fi and incl4.fi reside all in the same directory as the sourcecode.
Preprocessor: Yes
Default Include and Use path: Source File Directory
I hope you can help,
Kind regards,
Wilco de Vries.
>In my project sources are spread over many different directories. In all these directories >there are includefiles that are used by the sources in that same directory.
>According to the HELP-manual includefiles that reside in the same directory as the >sources should be found directly.
>Searching for Include and .mod Files
>Directories are searched for include files in this order:
>1. Directory of the source file that contains the include.
>Well, it does not.
>The default Include and Use Path is set to "Source File Directory"
>Can you please help me solving this problem.
Includefiles are found in de "Source File Directory" (as should be) if I specify them directly in my sourcecode.
But in my sourcecode the includefiles should be found in a part of the code with preprocessor lines eg:
subroutine Sub2
implicit none
include "incl2.fi"
#ifdef UNIX
# include "incl3.fi"
#else
# include "incl4.fi"
#endif
print *, 'Hello World from Sub2'
end subroutine Sub2
The compiler can find incl2.fi but it can't find incl4.fi.
incl2.fi, incl3.fi and incl4.fi reside all in the same directory as the sourcecode.
Preprocessor: Yes
Default Include and Use path: Source File Directory
I hope you can help,
Kind regards,
Wilco de Vries.
>In my project sources are spread over many different directories. In all these directories >there are includefiles that are used by the sources in that same directory.
>According to the HELP-manual includefiles that reside in the same directory as the >sources should be found directly.
>Searching for Include and .mod Files
>Directories are searched for include files in this order:
>1. Directory of the source file that contains the include.
>Well, it does not.
>The default Include and Use Path is set to "Source File Directory"
>Can you please help me solving this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, you're using #include. That I think has fdifferent rules.
Try using the standard Fortran INCLUDE statement.
Try using the standard Fortran INCLUDE statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cpp/fpp style #include requires setting an appropriate -Qfpp option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I removed the # at the beginning of the lines with include and now it all seems to work.
Thanks for all.
Regards,
Wilco de Vries.
I removed the # at the beginning of the lines with include and now it all seems to work.
Thanks for all.
Regards,
Wilco de Vries.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page