From: Rod.Bates@wichita.boeing.com (Bates, Rod)
Subject: Entry point not found in dll
7 Nov 1998 10:35:34 -0800
Message-ID: <6C7E2A10BB01D111929500400B406DDEE63949.cygnus.gnu-win32@xch-wch-02.ks.boeing.com>
Mime-Version: 1.0
Content-Type: text/plain
To: "'gnu-win32@cygnus.com'" <gnu-win32@cygnus.com>

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
"gnu-win32-request@cygnus.com" with one line of text: "help".
