forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unable to find an entry point in a DLL

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
BK



Joined: 07 May 2020
Posts: 14

PostPosted: Wed May 27, 2020 5:19 pm    Post subject: Unable to find an entry point in a DLL Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed May 27, 2020 8:40 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Thu May 28, 2020 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
BK



Joined: 07 May 2020
Posts: 14

PostPosted: Thu May 28, 2020 2:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
BK



Joined: 07 May 2020
Posts: 14

PostPosted: Thu May 28, 2020 2:45 pm    Post subject: Reply with quote

Tnx for the reply. Apparently my version of VS doesn't include dumpbin.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu May 28, 2020 3:05 pm    Post subject: Re: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group