|
|
 |
 |
 |
 |
Fortran Programming Language
|
 |
 |
 |
 |
 |
 |
 |
 |
re-using fortran dll in VS2005
Hi, i try to convert my apps from VB6 to VB2005. in my old apps i use some my dlls written with CVF 6.6. when i try to run it in VS2005 (VB2005) i have : dllnotfoundexception was hunandled unable to load DLL "pcroutdll.dll" Obviously in VB6 it works fine.... Any idea?
"ioson" <ioson_nosp @libero.it> wrote in message news:ttj7i.12432$nT2.1720@tornado.fastwebnet.it... > Hi, > i try to convert my apps from VB6 to VB2005. > in my old apps i use some my dlls written with CVF 6.6. > when i try to run it in VS2005 (VB2005) i have : > dllnotfoundexception was hunandled > unable to load DLL "pcroutdll.dll" > Obviously in VB6 it works fine.... > Any idea?
Then it equally obviously works in VB.NET 2005. 'DLL not found' usually means one of the following: 1. The DLL was truly not found. It is either not on the PC, or not on the searchable path. If in doubt, put a copy in <Windows>\System32; if it isn't found there, then move to [2] 2. The DLL is found, but a dependency is not found - this is the true 'DLL not found.' Usually this is the runtime library; sometimes the runtime library, in its turn, calls a C/C++ runtime library. You will need to look at the documentation to see what support libraries must be made available, and, yes, they too must be on the searchable path. Microsoft used to recommend that they should be placed in <Windows>\System32 - I gather that that recommendation has changed, but that puts more onus on you to ensure that the DLLs are found. With DVF the easiest way is to download the runtime library support from the Compaq website, and run that - you will automatically get all the DLLs and their dependencies installed. Start with http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1...
> Then it equally obviously works in VB.NET 2005.
Non so obvious....unfortunately ... >With DVF the easiest way is to download the runtime > library support from the Compaq website, and run that - you will > automatically get all the DLLs and their dependencies installed.
I have installed VFRUN66BI.exe (run time for CVF6.6) but the problem persist... I think that something in the way i buid my dlls is wrong for VS2005!! an example... c C SUBROUTINE idtdll(BUF,IG,IM,IA,NE) C !DEC$ ATTRIBUTES DLLEXPORT :: idtdll !DEC$ ATTRIBUTES ALIAS:'idtdll' :: idtdll c .... .... .... return END C C********************************************************* the compilation... /assume:byterecl /assume:dummy_aliases /compile_only /dbglibs /debug:full /iface:nomixed_str_len_arg /integer_size:16 /dll /nologo /traceback /warn:argument_checking /warn:nofileopt /module:"Debug/" /object:"Debug/" /pdbfile:"prova_pcroutdll/DF60.PDB" the linking kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Otsw32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"prova_pcroutdll/pcroutdll.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /def:".\Otsw32.def" /out:"prova_pcroutdll/pcroutdll.dll" /implib:"prova_pcroutdll/pcroutdll.lib" /pdbtype:sept
"ioson" <ioson_nosp @libero.it> wrote in message news:O5D7i.493$BU3.258@tornado.fastwebnet.it...
> > Then it equally obviously works in VB.NET 2005. > Non so obvious....unfortunately > ... > >With DVF the easiest way is to download the runtime > > library support from the Compaq website, and run that - you will > > automatically get all the DLLs and their dependencies installed. > I have installed VFRUN66BI.exe (run time for CVF6.6) but the problem > persist... > I think that something in the way i buid my dlls is wrong for VS2005!! > an example... > c > C > SUBROUTINE idtdll(BUF,IG,IM,IA,NE) > C
IG, IM, IA, NE: defined as INTEGER? I note that you compiler directive makes this INTEGER*2 And in the VB code? I thought that VB.NET makes INTEGER a 4-byte INTEGER, so you would need ?SHORT? for a 2-byte INTEGER. The VB -> VB.NET translator should have caught this if you translated workisng VB code to VB.NET > !DEC$ ATTRIBUTES DLLEXPORT :: idtdll > !DEC$ ATTRIBUTES ALIAS:'idtdll' :: idtdll
Looks just like mine for use with my VB.NET 2005/DVF project. The only issue I had with mine was making sure that the DLL was in the search path.
> c > .... > .... > .... > return > END > C > C********************************************************* > the compilation... > /assume:byterecl /assume:dummy_aliases /compile_only > /dbglibs /debug:full /iface:nomixed_str_len_arg /integer_size:16 /dll > /nologo /traceback /warn:argument_checking /warn:nofileopt > /module:"Debug/" /object:"Debug/" > /pdbfile:"prova_pcroutdll/DF60.PDB" > the linking > kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib > shell32.lib > ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Otsw32.lib > /nologo /subsystem:windows /dll /incremental:no > /pdb:"prova_pcroutdll/pcroutdll.pdb" > /debug /machine:I386 /nodefaultlib:"libc.lib" /def:".\Otsw32.def" > /out:"prova_pcroutdll/pcroutdll.dll"
/implib:"prova_pcroutdll/pcroutdll.lib"
> /pdbtype:sept
|
 |
 |
 |
 |
|