- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi guys
i have one major problem right now. After figuring out how to transfer data between dll and main program
i want to know how to transfer all data objects of a module and possibility of having several entire modules sharing between dll and main program
if i have to use DEC$ ATTRIBUTES EXPORT for each data objects of each module. i would have to add those statements 1000 times for 20 modules that i want to share
is there any easy way of doing this
thanks in advance
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For routines, it's sufficient to have a DLLEXPORT directive in each routine. For variables, there must be only one definition of the variable that is exported, so I am a bit unclear on the "1000 times for 20 modules" part, unless you have 20000 distinct things you want to export.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when i say 1000 times for 20 modules i mean
i have 20 modules with data objects. Almost each module has atleast 500 to 1000 variables.
even if i do $DEC ATTRIBUTE DLLEXPORT :: variables ...
i still have to add all the variables in the export list.
So, i was hoping if just by doing export on module itself, we should be able to share data
unfortunately when i try $DEC ATTRIBUTES DLLEXPORT :: module_name
the warning message i get is "eventhough attribute dllexport :: module_name is valid statement
it does not have any effect.
so i assume at this point there is no way to export entire module by one statement
thanks for the help
it clears lots of doubt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
we are working on a legacy fortran code. the code initially was in fortran 77 with about 20 include files and total of 30 to 40 commons. there are about 120 subroutines in the main program
the objective of creating a dll is that we can give executable with dll functionality to client. they can add their on functions in dll to do calculations without having us to modify the code for them. so we have to create few function in main program which calls dll functions. user can either use default dll's or provide their on.
we have 2 version of the program f77 version using commons in include files
and f95 version using modules
so using modules is out of question for now
for include files, i have few misconceptions
1) i have a common in include files and i want to share those commons between dll and application
i do $DEC ATTRIBUTES DLLEXPORT :: /common1/ in dll routines and
$DEC ATTRIBUTES DLLIMPORT :: /common1/ inapplication routine routine_1.
this shares data between dll and application routine_1
now if common_1 is used by some other routine i.e. routine_2 of application
do i have to do DLLIMPORT :: /common1/.
if i do not do DLLIMPORT :: /common1/ on routine_2, i do not see the updated common1. i see 0 values for all common variabls
please clarify
thanks in advance

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