On 06/01/2017 16:52, Bill Greene wrote: > This problem is not a generic gcc/gfortran one. > If you build the test code on Linux, it works correctly. > > Bill > the problem is gfortran one on Windows platform https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68040 If you create a directive like -------------------------------------- !GCC$ ATTRIBUTES DLLEXPORT :: /cb1/ integer cvar common /cb1/ cvar -------------------------------------- It produces and error like -------------------------------------- !GCC$ ATTRIBUTES DLLEXPORT :: /cb1/ 1 Error: Invalid character in name at (1) -------------------------------------- so the DLLEXPORT directive is not correctly managing "common" as "/cb1/" I also noted that the "!GCC$" must be at the beginning of the line otherwise is totally ignored, that is also very hard to note. Regards Marco