In order to build a DLL on Windows, I added !$DEC ATTRIBUTES DLLEXPORT directives to some code. This code needs to build under Intel Fortran Compiler for Mac OS X as well as Windows, but this attribute causes a compiler error on Macintosh.
I would have thought that the ! at the beginning was to hide this from compilers that don't support these statements (but I am pretty close to the start of the learning curve on modern Fortran), so that you can include directives for one platform and have them not bother you on another.
Of course, I'm using the Intel compiler on both platforms...
How can I write one source that compiles on both Windows and Mac OS X, where on Windows I'm creating a DLL and on OS X a static library?