Subject: Entry point not found in dll
From: [email-masked] (Bates, Rod)

7 Nov 1998 10:35:34 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
To: "[email-masked]'" <[email-masked]>

My executable builds but can't find entry points in a .dll.

The .dll/.lib/.h come from elsewhere, and don't include source.
I went through (one of?) the procedures for calling something
in a .dll/.lib.  I built a .def from the .lib, using nm, grep, and sed.
Then I built a lib*.a from the .dll and .def, using dlltool.
Then I linked to the lib*.a.  These steps worked without
error messages.  

But the .exe pops a dialog saying: 

"The procedure entry point EnumProcesses@12 could not\
be located in the dynamic link library psapi.dll"

I presume it found the .dll file itself, since I have in the past, 
seen dialogs to the effect that a .dll was not found.  In
any case, it is located in the same directory as the .exe,
which I understand is the first place the NT loader looks. 

Neither nm nor objdump find any symbols in the .dll
(but the symbols are in the .lib) 

I am using the pm3 1.1.7 Modula-3 compiler, which
uses gcc for code generation, linking, etc.
Also B19 + coolview

Here is my makefile for buiding the lib*.a: (backslash wraps
added, not in the real makefile) 

psapi.def : psapi.lib
	echo EXPORTS > psapi.def
	nm --demangle --defined-only psapi.lib | grep ' T ' |\
                   sed 's/.*T //' >> psapi.def

libpsapi.a : psapi.dll psapi.def
	dlltool --dllname psapi.dll --def psapi.def \
                       --output-lib libpsapi.a
Any help would be appreciated. 

Rodney Bates 
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".