FW: Use of DLLIMPORT with common blocks
Rotach, William F
william.f.rotach@lmco.com
Fri Oct 3 14:14:00 GMT 2014
Greetings Fortran team:
I am working on a Fortran project that utilizes common blocks across multiple shared objects, written in C and Fortran. We are currently using a copy of gcc 4.8.1, and have tested version 4.4.7 as well, where I have a similar response to bug # 47030.
I have found that any use of the "!GCC$ ATTRIBUTE DLLIMPORT :: <variable>" generates one of the following:
"warning: 'dllimport' attribute directive ignored" - when applied to a variable name
"Error: Invalid character in name at (1)" - when applied to a common block "/ variable /"
I assume the second is in response to the use of the slash, "/", and not the variable name itself.
In the end, what I need is for multiple Fortran modules to access variables in a dynamic library, that is also accessed by dynamically linked "C" libraries.
Any suggestions to lead me to this end result would be appreciated.
Regards,
Will Rotach
Build environment: CENTOS 6.4, x64, gcc suite 4.8.1
More information about the Fortran
mailing list