- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In MSVC there is the
#pragma data_seg("sdata") //.... #pragma data_seg() #pragma comment(linker, "/Section:sdata,RWS")
that lets you only share that data section and only that section in a dll. I was trying the module example in DLL_Shared_Data with the module data being in ".data" with /section:.data,RWS. In my anticipated code, there would be unshared data in it as well, and I was worried how to keep separate as that private data may be put in ".data".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think there's a way to do this in Intel Fortran. However, my usual advice for sharing data cross-process in a DLL (that's what the linker directive is for) is to put the data you want shared in its own module and build that module into a DLL. Have other code that wants to use that shared data link to that DLL.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think there's a way to do this in Intel Fortran. However, my usual advice for sharing data cross-process in a DLL (that's what the linker directive is for) is to put the data you want shared in its own module and build that module into a DLL. Have other code that wants to use that shared data link to that DLL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So if I had to use fortran for such, I would need two dll's one private and one shared data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I suppose that is true.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page