- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Folks,
I am trying to use cDEC$ in a conditional directive on Linux/IA64 to declare two integers E and D.
cDEC$ IF DEFINED (LINUX)
INTEGER*8 E, D
cDEC$ ELSE
INTEGER*4 E, D
cDEC$ ENDIF
INTEGER*8 E, D
cDEC$ ELSE
INTEGER*4 E, D
cDEC$ ENDIF
however, the compiler (efc 7.1)totally ignores my -DLINUX definition and gives the following error.
% efc -w -c-o DATA.o DATA.for -DLINUX
module DATA
module DATA
INTEGER*4 E, D
^
Error 115 at (675:../for/DATA.for) : A component with this name already exists
^
Error 115 at (675:../for/DATA.for) : A component with this name already exists
^
Error 115 at (675:../for/DATA.for) : A component with this name already exists
^
Error 115 at (675:../for/DATA.for) : A component with this name already exists
Not sure what I am missing. The directive works correctly on Windows.
Thanks
MKA
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I recall, with Intel Fortran 7.1, you have to have the source run through the preprocessor to support the conditional compilation directives. Either rename the source to have a .fpp file type or add the -fpp switch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
-fpp=1 is the default according to user manual, so I did not try that until your message. Apperantly,manuals (even at 7 th release) couldhave such simple mistakes.Setting -fpp=1 explicitly solved the issue.
Best
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand the confusion. The manual is trying to say that IF fpp is used, the default level is fpp=1. But fpp is not invoked by default for .for or .f90 file types.

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