- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to share a common area between individual executables . Ive seen various posts which refer to a sample called SAMPLESDLLDLLEXP2 which seems to be exactly what I need but have been unable to locate a copy anywhere. Can someone please point me to a link or provide the code.
A copy of a project solution would be great to avoid the issues I'm sure I'll have in understanding and converting the command line switches.
I already have DLL's sharing the common data.
Thanks in anticipation
GB
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The DLLEXP2 sample is not something I'd recommend, as it uses a rather confusing method (and didn't provide a project).
Tomorrow I'll attach a sample project that shows sharing information among executables. It uses module variables but the concept is the same with COMMON.
- 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
Thanks.
I tried loading it but I get a message on linking
Error1 error LNK2019: unresolved external symbol __imp__SHARED_GLOBALS_mp_SHARED_VARIABLE referenced in function _MAIN__C:FIntelinSharedDllDLL_Shared_Datamain.f901
Error2 error LNK2019: unresolved external symbol __imp__SHARED_GLOBALS_mp_NOT_DEAD_YET referenced in function _MAIN__C:FIntelinSharedDllDLL_Shared_Datamain.f901
Error3 fatal error LNK1120: 2 unresolved externalsC:FIntelinSharedDllDLL_Shared_Datamain.f901
The library is created but for some reason it isnt found. Ive tried all sorts of things to make it available with no success. I can't run the batch file because of some path issue. I want to avoid the batch thing anyway and run completely from the IDE. How can I force the load of the lib file in the IDE
Ive added the /section stuff to the link command line of the project properties
COMMON
What do I need to do to use common with this. Do all elements of common have to be non-zeroed, the common areas are quite large.
Here is a common area example I use with the DLL. The proper labels are defined in other includes
! modcom.f90
!
! FUNCTIONS/SUBROUTINES exported from modcom.dll:
! modcom - subroutine
!
BLOCK DATA
!DEC$ ATTRIBUTES DLLEXPORT:: /COMFLG/ !DEC$ ATTRIBUTES DLLEXPORT:: /RTCFG/ !DEC$ ATTRIBUTES DLLEXPORT:: /PMCFG/ !DEC$ ATTRIBUTES DLLEXPORT:: /RTAPP/ !DEC$ ATTRIBUTES DLLEXPORT:: /PMAPP/ !DEC$ ATTRIBUTES DLLEXPORT:: /RTSET/ !DEC$ ATTRIBUTES DLLEXPORT:: /PMSET/ BYTE DUMDLL1,DUMDLL2,DUMDLL3,DUMDLL4,DUMDLL5,DUMDLL6,DUMDLL7 ! COMMON /COMFLG/ DUMDLL1(4000) COMMON /RTCFG/ DUMDLL2(4000) COMMON /RTSET/ DUMDLL3(4000) COMMON /PMCFG/ DUMDLL4(4000) COMMON /PMSET/ DUMDLL5(4000) COMMON /RTAPP/ DUMDLL6(4000) COMMON /PMAPP/ DUMDLL7(4000)END
Thanks
GrahamB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Further to the above, I created a new solution from scratch using the f90 files and now have it working (although I need to copy all of the DLL files into the the main debug directory). Ineed the share to run in quickwin and get an error now using windows instead of console indicating.
possible internal inconsistency file src/quickwin/qwkinit.c line 131
which seems to stop the second instance from starting.
Any ideas.
regards GB
- 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
Thanks,
In that case how can I share common between QUICKWIN applications.
Regards Graham B
- 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
Thanks.
Current state of play is that I have used your example, modified the module to be a BLOCK DATA common and have it working (removing a lot of the loccking code) and have successfully sahed the common amongst many applications BUT only if they are Console Apps.
If I try exactly the same code (including your original) when it tries to start the second copy of the application, the Quickwin versions fail and so it never gets far enough to have 2 quickwin applications running.
As mentioned above, the error message is
"possible internal consistency file "src/quickwin/qckinit.c line 131"
Various other thing I have tried (without debug) simply crash with an exception violation.
If you can make your example run under quickwin as opposed to console , that will solve my problem I'm sure.
My BlockData code is
BLOCK DATA
! in order to be placed in .data section!dec$ attributes dllexport :: /COMFLG/
!dec$ attributes dllexport :: /RTFLG/
COMMON
/COMFLG/ABC(10)COMMON
/RTFLG/JKF(10)real
:: ABC,JKFdata
ABC(5)/888.0/ ! only needs 1 element in the common to force to .data sectiondata
JKF(10)/888.0/ ! only needs 1 element in the common to force to .data sectionend
Which is very similar to what I sent before but simpler.
My need is simply to share the memory locations, I will manage all of the data locking etc externally and only need what windows needs to physically share the memory locations and support the multiple applications
Thanks for your help
Graham B
/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i tried following this guideline to work with commons
i can not seem to share the data between dll and main program through common declare in include file
there are actually 2 common, 1 common is part of the include file and that include file is included in both dll and main program. the other common i declare in both dll and main program.
the common declared in both dll and main program works ok and shares common data
however, common declare in include file is not shared
any thoughts what might be wrong

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