Neil Smith writes:
> I am trying to use an Aonix ADA DLL with CVF on Win2k.
>
>
> The following FORTRAN code can access the functions, but I
> can't seem to get
> the attributes statement correct for the data elements
[snip]
>
> !DEC$ATTRIBUTES EXTERN :: Init_Att_Done_ADA
> !DEC$ATTRIBUTES DLLIMPORT :: Init_Att_Done_ADA
Are you aware that we offer free support by e-mail at [log in to unmask]
I see that you have posted this to comp.lang.fortran (though an incomplete
version there) as well as here, but don't see anything from you in our
support database. This is a sort of problem we're glad to help out with.
If you look in the mixed-language programming chapter of the Visual Fortran
Programmer's Guide, you'll see that the Fortran mapping to C externs is a
COMMON block. Therefore, I think you'd want this:
COMMON /Init_Att_Done_ADA/ Init_Att_Done_Ada
!DEC$ ATTRIBUTES DLLIMPORT, ALIAS:"Init_Att_Done_ADA" ::
/Init_Att_Done_ADA/
Try that and see if it works for you. If not, send us a copy of the DLL
(including export library if you have one) and your Fortran code to
[log in to unmask] and we'll take a look.
Please send Visual Fortran support requests to [log in to unmask]
Steve Lionel
Compaq Fortran Engineering
http://www.compaq.com/fortran
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|