- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
In my application I have to share data between 2 dll's. The data is defined in a Fortran module and when using
!DEC$ ATTRIBUTES DLLEXPORT it works, however when compiling the code on a linux platforI get warning messages about the !DEC$... Is there a way to remove the !DEC$... from the Fortran modules but still being able to use the data in both dll's ?
Best Regards,
Albert
In my application I have to share data between 2 dll's. The data is defined in a Fortran module and when using
!DEC$ ATTRIBUTES DLLEXPORT it works, however when compiling the code on a linux platforI get warning messages about the !DEC$... Is there a way to remove the !DEC$... from the Fortran modules but still being able to use the data in both dll's ?
Best Regards,
Albert
Link Copied
11 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!DEC$ is an extension. You could try f2003's deficientC interop features to get around this.
Gerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But there's no DLLEXPORT in the C interoperability feature.
The way I would approach this is:
!DEC$ IF DEFINED (_WIN32)
!DEC$ ATTRIBUTES DLLEXPORT :: name
!DEC$ END IF
The way I would approach this is:
!DEC$ IF DEFINED (_WIN32)
!DEC$ ATTRIBUTES DLLEXPORT :: name
!DEC$ END IF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How tautological! Allthat does is assure that it's portable to Windows if one is using MSFP, Digital, Compaq, or IVF,whichwe knewalready.
Even scripting languages have superior C interop than f2003.
Gerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My understanding was that it was desired to avoid the warning about the unsupported DLLEXPORT attribute on Linux when using the Intel compiler there. The code I suggested would do that.
DLLEXPORT has nothing to do with C interop.
DLLEXPORT has nothing to do with C interop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another tautology. Next.
Gerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is that I would like to get rid of the !DEC$... directives
but still would be able to access the data from both my dll's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't. If you are exporting or importing variables, the directives are required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pity that I have to use the !DEC$ ... directives.
In the near future I have to port the application to 64-bit. Do I have to use the !DEC$ in the 64-bit version as well ?
Albert
In the near future I have to port the application to 64-bit. Do I have to use the !DEC$ in the 64-bit version as well ?
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
g.f.thomas:
Another tautology. Next.
Gerry
You are being rude, but what's new!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What, another tautology. Enough.
Gerry

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page