View previous topic :: View next topic |
Author |
Message |
tomo.bbe
Joined: 26 Feb 2008 Posts: 3
|
Posted: Mon Jul 13, 2009 4:17 pm Post subject: HDF5 Library and FTN95 |
|
|
Has anybody here successfully compiled and tested the HDF5 (version 1.8) library with FTN95?
I have been trying this afternoon with not much success. I have successfully compiled �hdf5_fortrandll.dll� from the source code. I have linked this with �hdf5dll.dll� and �hdf5_f90cstubdll.dll� and all went well. I can even compiled the test examples with no missing symbols. However when I try to run any of these applications I receive an �Application failed to initialize�� error. I have analysed this error with Dependency Walker and it is fails with the following:
Quote: | LDR: LdrpWalkImportDescriptor() failed to probe hdf5_f90cstubdll.dll for its manifest |
Which leads me to wonder whether I need to recompile this dll for FTN95 as well, but quite frankly I have no idea what I�m doing. I�d be grateful for any help, and can provide more information if required.
Regards,
James
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Jul 13, 2009 7:54 pm Post subject: |
|
|
If you can get hold of the binaries for (say) Windows XP and Visual Studio 2005 w/ Intel Fortran 9.1, then it may be possible to use these with FTN95 together with the command line switch /import_lib.
However, you will have use the source files provided for the Fortran module interfaces becaiuse the MOD files will have to be compiled using FTN95. I am assuming that these Fortran modules will provide an interface into the APIs located in a DLL. You will also need to change the code by adding the F_STDCALL attribute to each API library interface.
This is a bit of a long shot but it may be worth a try. |
|
Back to top |
|
 |
tomo.bbe
Joined: 26 Feb 2008 Posts: 3
|
Posted: Tue Jul 14, 2009 3:28 pm Post subject: |
|
|
Thanks for the advice Paul.
I have made some progress today. The library is organised as follows:
hdf5dll.dll -- core C library.
hdf5_f90cstubdll.dll -- are C stubs for the F90 interface.
hdf5_fortrandll.dll -- is the F90 interface.
I have compiled the 'stub' dll with SCC and linked it with the core dll which was from XP 32bit VS2005 binary release. I have then compiled and linked the 'fortran' dll with FTN95.
I have managed not to get an missing symbols or errors. However the test applications do not work correctly and generate argument errors in the core library.
Do you think this could be caused because of the different compilers used for the two C dlls? I have tried compiling the core dll with SCC but this has not worked (and I don't know enough C to debug it). |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Jul 14, 2009 5:30 pm Post subject: |
|
|
You will need to make allowance for the fact that the given DLLs will almost certainly use the STDCALL protocol (unless you compile everything with either SCC or FTN95). STDCALL is not the default protocol for FTN95. |
|
Back to top |
|
 |
|