- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thanks for the help anyway.
John.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
The dll source you posted seems to export DLL_MOD_mp_TEXT. Is that what you intended?
Gerry
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thanks for the help!!
John.

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable