Hi all,
the program I'm developing have to run on windows and linux and therefore I like to add preprocessor directive for system specific data/modules. What works on both platforms (ifort 12.1.6.369 on windows, gcc 4.6.3 on linux) is:
[fortran]
!dec$ if defined(_WIN32) || defined(_WIN64)
seperator = '\'
!dec$ else defined(__linux__)
seperator = '/'
!dec$ endif
[/fortran]
So far, so good. But I also want to use the directives for modules and there it seems not to work. First I tested it under windows in princible not for cross compiling but different compilers:
[fortran]
!dec$ if defined(_WIN32) || defined(_WIN64)
use ifport
!dec$ else defined(_VF_VER=1110)
use dfport
!dec$ end if
[/fortran]
Here I got the following error:
"error #5082: Syntax error, found 'USE' when expecting one of: FIXEDFORMLINESIZE FREEFORM NOFREEFORM STRICT NOSTRICT PACK ATTRIBUTES OBJCOMMENT ... "
Is it forbidden for modules or made I something wrong? In this thread http://software.intel.com/en-us/forums/topic/270845 someone used preprcessor directives for modules but with another syntax ($if instead of !def$)? This is not working in ifort 12.1.6.369 also?
Any help is welcome,
Johannes
ps: ifort flags in windows: /nologo /O3 /Qparallel /heap-arrays500 /Qopt-matmul /I"D:\Arbeitsverzeichnis_Jo\Fortran\PRoSiT\PRoSiT_aux_lib\x64\Release" /I"D:\Arbeitsverzeichnis_Jo\Fortran\PRoSiT\PRoSiT_geo_lib\x64\Release" /arch:SSE3 /Qvec-report1 /real_size:64 /Qzero /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc100.pdb" /libs:static /threads /c
連結已複製
