Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28523 Discussions

DLL subroutine uses another DLL subroutine

Intel_C_Intel
Employee
215 Views
Hello,
I have some trouble. I'm creating DLL with structure:
module SubSub has subroutine DLLSubSub which is exported.
module DLL has subroutine DLLSub which uses DLLSubSub from module SubSub and is exported too.
In main program I can run DLLSubSub. All ok. But when I run DLLSub this subroutine can't run DLLSubSub: access violation error.
Of course onesolve is write DLLSubSubInternal and don't export it -- then all works. But in this case I have to 1) duplicate subroutine DLLSubSub to DLLSubSubInternal specialy for DLL 2) use this duplicat DLLSubSubInternal name in DLLSub.
Probably there is method not to duplicate subroutine? Help, who knows.
Stanislav
0 Kudos
2 Replies
Intel_C_Intel
Employee
215 Views
"Access granted" for attachments. So I attach sample Dll for better understanding my problem.
Stan

Message Edited by fedorovstanislav@mail.ru on 08-12-2005 11:57 AM

0 Kudos
Intel_C_Intel
Employee
215 Views
Hello

Done. I got it. One specially DLLIMPORT interface is required for DLLSubSub in DLL module. So DLL module imports DLLSubSub subroutine from the same library specially for DLLSub subroutine. DLL uses DLL herself.

Stan
0 Kudos
Reply