www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - SymGetLineFromAddr64

reply DamiŠn <DamiŠn_member pathlink.com> writes:
I'm trying to use SymGetLineFromAddr64 function (from DbgHelp) but I get:

Error 42: Symbol Undefined _SymGetLineFromAddr64 20

I am including:

extern(Windows){
BOOL SymGetLineFromAddr64(HANDLE hProcess,DWORD64 dwAddr,PDWORD
pdwDisplacement,PIMAGEHLP_LINE64 Line);
}

What should I do to use it?

DamiŠn.
Jan 20 2006
parent reply "Chris Miller" <chris dprogramming.com> writes:
On Fri, 20 Jan 2006 17:03:47 -0500, Dami√°n <Dami√°n_member pathlink.com>  
wrote:

 I'm trying to use SymGetLineFromAddr64 function (from DbgHelp) but I get:

 Error 42: Symbol Undefined _SymGetLineFromAddr64 20

 I am including:

 extern(Windows){
 BOOL SymGetLineFromAddr64(HANDLE hProcess,DWORD64 dwAddr,PDWORD
 pdwDisplacement,PIMAGEHLP_LINE64 Line);
 }

 What should I do to use it?

 Dami√°n.

None of the lib files you're passing to the linker/DMD have a reference to that function. Either make a def file for the dll with it under EXPORTS, or use linkdef at http://www.dprogramming.com/linkdef.php , and run the def file through implib to generate the lib file; or if you have a COFF lib (e.g. from a MS compiler) you can use that new COFF->OMF import library converter that comes with DMC.
Jan 20 2006
next sibling parent DamiŠn <DamiŠn_member pathlink.com> writes:
Thanks I will try with linkdef.
-------------------------------

None of the lib files you're passing to the linker/DMD have a reference to  
that function. Either make a def file for the dll with it under EXPORTS,  
or use linkdef at http://www.dprogramming.com/linkdef.php , and run the  
def file through implib to generate the lib file; or if you have a COFF  
lib (e.g. from a MS compiler) you can use that new COFF->OMF import  
library converter that comes with DMC.

Jan 20 2006
prev sibling parent "Charles" <noone nowhere.com> writes:
Thats a fun tool linkdef :).  Ill have to remember it.

Charlie


"Chris Miller" <chris dprogramming.com> wrote in message
news:op.s3o6srp4po9bzi moe...
 On Fri, 20 Jan 2006 17:03:47 -0500, DamiŠn <DamiŠn_member pathlink.com>
 wrote:

 I'm trying to use SymGetLineFromAddr64 function (from DbgHelp) but I


 Error 42: Symbol Undefined _SymGetLineFromAddr64 20

 I am including:

 extern(Windows){
 BOOL SymGetLineFromAddr64(HANDLE hProcess,DWORD64 dwAddr,PDWORD
 pdwDisplacement,PIMAGEHLP_LINE64 Line);
 }

 What should I do to use it?

 DamiŠn.

None of the lib files you're passing to the linker/DMD have a reference to that function. Either make a def file for the dll with it under EXPORTS, or use linkdef at http://www.dprogramming.com/linkdef.php , and run the def file through implib to generate the lib file; or if you have a COFF lib (e.g. from a MS compiler) you can use that new COFF->OMF import library converter that comes with DMC.

Jan 23 2006