- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Balises:
- Intel® Fortran Compiler
Lien copié
8 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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)
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Sorry, I misread your post -- I thought you were asking how to include files from different directories.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
cpp/fpp style #include requires setting an appropriate -Qfpp option.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable