- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have /iface:cvf in the Debug configuration but not Release. This will change global names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggested that you look at the list of exported names in Dependency Walker. Dumpbin sometimes lies. What name is it looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Again, I am asking about exported names, not dependent DLLs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page