Thread overview
Making windows API Calls
Jul 23, 2003
tbayne
Jul 23, 2003
Paul Runde
Jul 23, 2003
Burton Radons
Jul 24, 2003
Helmut Leitner
July 23, 2003
Hi,

I have a question.  I have just started playing with 'D' under windows.  I am trying to call the OutputDebugString() function and can't quite figure out how to make this work.

I keep getting a "Error 42: Symbol Undefined _OUTPUTDEBUGSTRING@4" message from the linker.

Thanks

Terry Bayne
tbayne@hiwaay.net
July 23, 2003
Try adding the declaration:

export void OutputDebugStringA(LPCTSTR);

or for wchar:

export void OutputDebugStringW(LPCWSTR);

windows.d is not complete yet.  You could create a file to hold
API declarations specific to your needs and remove them later as they
are added to the D distribution.  You may also find existing files for
download at any of the sites listed on the D Links page.  Try DedicateD (http://int19h.tamb.ru/).

Paul


tbayne@hiwaay.net wrote:

> Hi,
> 
> I have a question.  I have just started playing with 'D' under windows.  I am
> trying to call the OutputDebugString() function and can't quite figure out how
> to make this work.
> 
> I keep getting a "Error 42: Symbol Undefined _OUTPUTDEBUGSTRING@4" message from
> the linker.
> 
> Thanks
> 
> Terry Bayne
> tbayne@hiwaay.net

July 23, 2003
tbayne@hiwaay.net wrote:

> I have a question.  I have just started playing with 'D' under windows.  I am
> trying to call the OutputDebugString() function and can't quite figure out how
> to make this work.

Use:

   extern (Windows) void OutputDebugStringA (char*);

And then when calling DMD to compile it, include "kernel32.lib" as an option.

July 24, 2003

tbayne@hiwaay.net wrote:
> 
> Hi,
> 
> I have a question.  I have just started playing with 'D' under windows.  I am trying to call the OutputDebugString() function and can't quite figure out how to make this work.
> 
> I keep getting a "Error 42: Symbol Undefined _OUTPUTDEBUGSTRING@4" message from the linker.

Added to the FAQ page:
   <http://www.prowiki.org/wiki4d/wiki.cgi?FaqRoadmap#CallaWindowsfunction>

--
Helmut Leitner    leitner@hls.via.at Graz, Austria   www.hls-software.com