- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the normal procedure to attach a dll file into my project? That is, how to call the funcs/subroutines residing on different dll if I just having the binary libraries (header, lib's, dll's).
If I have just header and static libraries (*.lib) do I still need the dll's?
Regards,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mydll.lib file will contain all the information you need about mydll.dll including the names of the subroutines/functions that are callable in the dll provided that you have Exported the names using the required DLLEXPORT directives within the Fortran code or have included in the DLL project a .DEF file listing those names that you want to make visible from the DLL.
You then just add the mydll.lib file to any Fortran project that requires the subroutines/functions that are included in the DLL.
You will also need to add to your Fortran project's code interface blocks for the DLL subroutines and functions that are going to be called, so that it can get the calling convention right, and also to add DLLIMPORT directives where necessary so that the compiler knows that any routines and functions mentioned in your project's code that it canot find within your project's code are to be supplied by a DLL which will be loaded later (provided you have added the mydll.lib file to the project).
See the IVF Help on creating libraries (DLLs). Sample projects are included when you install IVF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually those dll's and lib's I'm trying to attach are not something that I've created, they have been created by some other 3rd-parties , to be specific it's OpenMPI binary libraries. So I have a clue about what (via headerfiles)funcs/subroutinesthosedll's, lib's includes, but couldn't run them successfully. In my ideaI've sorted out everything as it should be,Additional Dependencies(AD) to library names, andAD search path to corresponding OpenMPI folder, and so the header files. I also set the Enviromental Variables Path to point out at the dll directory of OpenMPI, but that didn't help.
The last chance was to copy all dll's to folder where my project is, I've done it but this time another weird message popped out.
"The procedure entry point InterlockedCompareExchange64 could not be located in the dynamic link library KERNEL32.dll"
What is has to do with Kernel32.dll?
Something that arouse my suspicion,why there is a suffix with "64" at the end of
Comments will be appreciated,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've managed to get the code working w/o any complaints and "*.dll not found" messages, this time when program course comes into MPI_INIT (which I think is very first routine) IVF simply exits the program. What could be reason of that ?
Before successful compilation and linking it was complainig about "not found pdbx.dll ". I just simply copied it from IVF/lib/Ia32 directory to my project folder.
Any comments will be appreciated.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page