- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling several subroutines into 64-bit dll's using Intel Fortran XE 2015, and some of them call IMSL (static library).
I can call these dll's from VBA (Excel add-ins) fine on machines that already have the compiler and IMSL installed. However, when I share the dll's with colleagues, the ones that do not use IMSL work fine, while those calling IMSL routines get the "Run-time error '53' file not found" error.
What am I supposed to do to make my IMSL-based dll's portable to machines that do not have Fortran or IMSL installed?
In case it would shed a light on my problem, here is the Visual Studio setup below:
Fortran command line:
/nologo /O2 /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc120.pdb" /libs:static /threads /c
Linker command line:
/OUT:"x64\Release\FortDLL.dll" /NOLOGO /MANIFEST /MANIFESTFILE:"x64\Release\FortDLL.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:WINDOWS /IMPLIB:"E:\WAKData\Dropbox\FortDLL\FortDLL\x64\Release\FortDLL.lib" /DLL
Thanks,
Wagner
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you haven't shown is how you specify the set of IMSL libraries to link in. If you are including 'link_fnl_shared', then you'll get the DLL form of IMSL requiring that you redistribute that DLL.
DependencyWalker is useful in seeing which DLLs you are dependent on. Best to use it on the target system - and keep in mind that on a 64-bit system it doesn't understand that Windows skips over "wrong architecture" DLLs in its search.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I'm sorry, here's what I have on my Fortran code:
!DEC$attributes dllexport, alias:'SLOGIT' :: SLOGIT
INCLUDE 'link_fnl_static.h'
I thought that by using the static library I would get the called IMSL routines embedded into my dll.
Thanks,
Wagner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you would get static IMSL, but I just realized that this would also pull in the OpenMP library which is DLL-only. So you'll need at least libiomp5,dll in PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did some digging using Dependency Walker and found that the target system did not have libiomp5md.dll.
Once I placed a copy of it in the same foldercontaining my dll's, all my Excel add-ins worked.
Thank you for the tip on Dependency Walker!
Wagner
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page