Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

error 0x8007007f when using debug version of fortran dll

While using c# (vs 2015) code to invoke a intel fortran 2016 dll in VS 2010 using dllimport, the 'release' version of fortran dll works fine whereas the debug version gives an error saying "0x8007007f - unable to load dll .... Cannot find dll procedure "

dumpbin for debug version of fortran dll:

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    common32.dll
    libifcoremd.dll
    libmmd.dll
    MSVCR100.dll

  Summary

     5747000 .data
        2000 .idata
       A7000 .rdata
       4D000 .reloc
        1000 .rsrc
      18A000 .text
       21000 .trace
        1000 _RDATA

dumpbin for debug version of fortran dll:

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    common32.dll
    libifcoremd.dll
    libmmd.dll
    MSVCR100.dll
    svml_dispmd.dll

  Summary

     5741000 .data
        2000 .idata
       10000 .rdata
       4D000 .reloc
        1000 .rsrc
       FD000 .text
        1000 _RDATA

 

too, here is the command line for fortran debug:

/nologo /debug:full /Od /fpp /assume:nosource_include /debug-parameters:all /warn:declarations /warn:unused /warn:uncalled /warn:interfaces /assume:byterecl /iface:cvf /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /check:uninit /libs:dll /threads /c

and for release:

/nologo /O3 /fpp /assume:nosource_include /assume:byterecl /iface:cvf /module:"Release\\" /object:"Release\\" /Fd"Release\vc100.pdb" /libs:dll /threads /c

 

for debig linker:

/OUT:"Debug\abc.dll" /NOLOGO /MANIFEST /MANIFESTFILE:"Debug\abc.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\foo\Debug\abc.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"C:\foo\Debug\abc.lib" /DLL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 

for release linker:

/OUT:"Release\abc.dll" /INCREMENTAL /NOLOGO /MANIFEST /MANIFESTFILE:"Release\abc.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:WINDOWS /IMPLIB:"c:\foo\Release\abc.lib" /DLL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib

nothing weird in the above , i guess? or should i be seeing a svml-* runtime for debug version as well?am trying to debug into the fortran code by using the debug version.

building win32 version of dll. as i said, release dll 'loads' fine and returns a result. it's the debug version of the dll that is causing this dll not found issue..

what could i be missing?

thanks!

 

0 Kudos
8 Replies
Highlighted
1 View

You have /iface:cvf in the

You have /iface:cvf in the Debug configuration but not Release. This will change global names.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
1 View

Quote:Steve Lionel (Intel)

Steve Lionel (Intel) wrote:

You have /iface:cvf in the Debug configuration but not Release. This will change global names.

nope - release also has that flag (iface:cvf) set

 

 

0 Kudos
Highlighted
1 View

Oops - missed that.

Oops - missed that.

Ok, next question. Are you trying to use this DLL on a system other than the one where you built it?

The reference to libsvml is due to optimization - this is the Short Vector Math Library and is used only when the vectorizer is active.

I would suggest opening the Debug DLL in DependencyWalker on the target system and compare the list of exports with that of the Release DLL. Also look for errors about missing dependent DLLs, but don't worry about issues about delay-load or wrong architecture DLLs.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
1 View

both are on the same 'dev'

both are on the same 'dev' machine.. dumpbin doesnt say anything that's different from release version of dll

dependencywalker shows the same list of dlls to be missing for both release and debug versions of the dll..not much help there either..

0 Kudos
Highlighted
1 View

I suggested that you look at

I suggested that you look at the list of exported names in Dependency Walker. Dumpbin sometimes lies. What name is it looking for?

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
1 View

Here is the list of dll's

Here is the list of dll's shown to be missing from *both* debug and release versions of the dll in dependency walker. (Nothing here *seems* to stand out since the release version works just fine)

 

Capture1.PNG

0 Kudos
Highlighted
1 View

Again, I am asking about

Again, I am asking about exported names, not dependent DLLs.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
1 View

Interestingly, setting the

Interestingly, setting the Release mode to include "full debug" is working. So it leads me to think that the optimization flag has to do /o3 vs /od in the debug version coming back and saying 'not found'.  will dig deeper into this later, but for now, my "debugging" is working (albeit on a release mode dll with full debug enabled).

thanks steve for your help.

0 Kudos