delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/07/10:35:34

From: Rod DOT Bates AT wichita DOT boeing DOT 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
To: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT 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 AT 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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019