View previous topic :: View next topic |
Author |
Message |
BK
Joined: 07 May 2020 Posts: 14
|
Posted: Wed May 27, 2020 5:19 pm Post subject: Unable to find an entry point in a DLL |
|
|
I'm trying to use Visual Studio 2019 to build a Win32 GUI for legacy F77 FORTRAN software. IN VS, I've used DLLImport and LoadLibrary to load the fortran DLL. VS reports no errors or warnings, so that part should be OK. The legacy FORTRAN consists of entry subroutine Inputs2 with 3 integer parameters and a character/string parameter. Inputs2 calls 3 other subroutines. I'm using the FTN95 option. I added F_STDCALL to the entry subroutine line and added a !FTN95$ DLLEXPORT,STDCALL,ALIAS:'Inputs2' :: Inputs2 line (I'm using some of the syntax for a DEC line). Compiler switches are /CHECKMATE /FPP /CFPP and the linker option is -EXPORTALL. The DLL builds OK and is in the same directory as the VS executable. But I'm still getting "Unable to find an entry point in a DLL." Is there anything else I can try? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Wed May 27, 2020 8:40 pm Post subject: |
|
|
What language and which compiler are you using for the GUI?
Is it 32 bits or 64 bits?
The DEC directives will not work with FTN95.
Have you looked at "Mixed language programming" in FTN95.chm? |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Thu May 28, 2020 2:05 pm Post subject: |
|
|
You might want to check, if the dll in question exports the symbols you expect. Normally you could do this from a command shell of the Visual Studio by typing
Code: |
dumpbin /EXPORTS <dll name>
|
Regards,
Dietmar |
|
Back to top |
|
|
BK
Joined: 07 May 2020 Posts: 14
|
Posted: Thu May 28, 2020 2:37 pm Post subject: |
|
|
For VS, language is visual basic, 32 bit. Out of frustration, I thought I'd try something like a DEC command. I'll check out FTN95.chm, tnx for the hint. |
|
Back to top |
|
|
BK
Joined: 07 May 2020 Posts: 14
|
Posted: Thu May 28, 2020 2:45 pm Post subject: |
|
|
Tnx for the reply. Apparently my version of VS doesn't include dumpbin. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Thu May 28, 2020 3:05 pm Post subject: Re: |
|
|
BK wrote: | Tnx for the reply. Apparently my version of VS doesn't include dumpbin. |
You can modify the VS installation and specify that the Visual C++ compiler, libraries, headers and tools be installed. Dumpbin will be among the utilities that get installed. |
|
Back to top |
|
|
|