Dear All I have a small Fortran program containing preprocessor macro. Below is a minimal example. On mac os x, it works well but when I compile it on windows 7 (64-bit) it always prints unknown operating system. I am using gfortran-4.8.0 (mingw32) on windows 7.
      program foo
      implicit integer(i-n), double precision (a-h,o-p),
     + character*8(x-z)
*
#ifdef _WIN64
      zterm = 'wxt'
#elif _WIN32
      zterm = 'wxt'
#elif __APPLE__
      zterm = 'aqua'
#elif __linux
      zterm = 'x11'
#elif __unix
      zterm = 'x11'
#elif __posix
      zterm = 'x11'
#else
      print*, 'unknown operating system'
#endif
      end program foo
Changing #ifdef _WIN64 to #if defined (_WIN64) did not help. Any suggestion will be appreciated.
 
    