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
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 23 2006