- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been having trouble compiling some source. The problem is that I get a "First-chance exception" error whenever I try a character assignment where the left side (which is part of a module in a dll) is involved somehow in the right side, say:
!In the dll:
module dll_mod
character(256) :: text
!DEC$ATTRIBUTES DLLEXPORT :: text
end module
!in the main program:
use dll_mod
text = ' whatever'
text = ADJUSTL(text)
write (*,*) text
read(*,'(A)')
end
Since "msvc80d.dll" was involved in the error, I already tried uninstalling IVF, repairing the Visual Studio and reinstalling IVF. But that didn't solve the problem.
Any ideas about what is it that I'm doing wrong? (the VS-Solution is attached).
John.
Link Copied
- 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
What happens if you place a subroutine following a CONTAINS in the dll_mod, just a dummy NO-OP subroutine and call that at the beginning of the main program. Then perform the text=' whatever'. i.e. the call of the subroutine performs the load (binding) of the dll to the virtual memory of the program. This may make the pointers to the text valid.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help anyway.
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you report this to Intel Premier Support? If so, please give me the issue number. If you have not done so, please do that and specify the appropriate priority for the issue. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John,
Consider this:
The loading of a DLL is performed by way of a name for the DLL entry point(s). The whereabouts of this DLL is determined at run time at the first call. A system may have many DLLs that contain the proper named entrypoint(s), the selection of which is performed in a pecking order. Until this load is performed there is no way of knowing what the debug symbols are nor where the locations will (eventually) reside. (look at articles relating to DLL Hell)
Applications can be written generally in two ways
a) Make the first call into a DLL "Blindly". i.e. let the O/S go through some pecking order to locate something that qualifies as matching the call.
b) Explicitly loadingthe required (and specific)DLL during initialization.
If using b) then likely you also have an INIT call into the DLL which could suffice for the step into to get the debug symbols.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim: I don't see how your last post relates to my issue (i.e., it reads just like "Shared Objects 101"), and in any case I already uninstalled and reinstalled a previous version... But thanks, anyway.
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just installed IVF 10.1.014... and although I don't get "First-chance exception" anymore, I now get "forrtl: severe (157): Program Exception - access violation". My test program is still the same:
!In the dll:
module dll_mod
character(256) :: text
!DEC$ATTRIBUTES DLLEXPORT :: text
end module
!in the main program:
use dll_mod
text = ' whatever'
text = ADJUSTL(text)
write (*,*) text
read(*,'(A)')
end
Am I missing something?
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The dll source you posted seems to export DLL_MOD_mp_TEXT. Is that what you intended?
Gerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help!!
John.

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