Silverfrost Forums

Welcome to our forums

Unable to find an entry point in a DLL

27 May 2020 4:19 #25519

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?

27 May 2020 7:40 #25520

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?

28 May 2020 1:05 #25522

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

dumpbin /EXPORTS <dll name>

Regards, Dietmar

28 May 2020 1:37 #25523

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.

28 May 2020 1:45 #25524

Tnx for the reply. Apparently my version of VS doesn't include dumpbin.

28 May 2020 2:05 #25525

Quoted from BK 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.

Please login to reply.