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

Call a Fortran Dll file from another Dll!

lyricx
Beginner
319 Views
I met with the following problem:

I have two Fortran Dll files ("A", "B") and one main Fortran program ("C"), I loaded can access the specific address of one subroutine "a" of A when I run "C" by using Windows API, "loadlibrary" and "getprocaddress". Then I want to call the subroutine "a" from another Dll "B", of course, I passed the handle of "a" through "C" to "B" and gave the interface of "a" in "B".
But when I call "a" in B, I met with the problem :


"
fortrtl: severe (159): Program exception - breakpoint
...
"
It there some problems for my calling methods?
Thank you for your clarifications!
0 Kudos
2 Replies
Steven_L_Intel1
Employee
319 Views

Your DLL calling method, at least as you've described it, seems ok.It's unusual to get that specific error unless you're using an old compiler version and have uninitialized variable checking turned on.

0 Kudos
lyricx
Beginner
319 Views
Thanks! Steve!

When I load the Dll from my current Dll instead of main program, it seems work fine.
0 Kudos
Reply