Error: Undeclared identifier: 'OutputDebugString'
Asked Answered
T

2

8

I use OutputDebugString in my Delphi Code, but I receive the error:

Error: Undeclared identifier: 'OutputDebugString'

Which package is this OutputDebugString in?

Tantalize answered 11/8, 2011 at 22:52 Comment(7)
Useful tip in future; In a unit that has it working, Ctrl-Click and it will find the unit containing the symbol. And in Delphi recent versions, F1 on OutputDebugString might get you some help too.Exegetics
Instead of Ctrl-Cick, I prefer to use "Find definition" from the context menu (or is it "Find declaration"?). I keep forgetting all those key-key and key-mouse combinations.Tsui
...or hover your mouse cursor over the symbol and see the help insight (in a unit that has it working).Laudable
Personally I prefer Windows Search 4. At the beginning you just need to explain it that pas-files are "plain text" and point it to directories which should be indexed.Dulciedulcify
@Dulciedulcify - I prefer source searching too, because some classes are defined in more than one namespace - for instance TBitmap; it's in Graphics.pas as well as in Windows.pas but they mean totally different thing. There I wouldn't rely on the methods mentioned above; even if they are much more faster than this searching. But hey, isn't there some tool, some class explorer for this, something in CnPack or another IDE extension ?Walking
If not it would be fine to create one. As a starting version would be enough to search .pas (.inc and whatever) files in predefined directories for TClassYoureLookingFor =Walking
Windows Search 4 is extremely fast. I never had a need of something faster.Dulciedulcify
L
21

It's declared in the Windows unit.

Lute answered 11/8, 2011 at 22:54 Comment(0)
W
1

In windows unit in Winapi namespace:

uses
   Winapi.Windows;

How to find the unit of a specific command:

  • Through Find Definition command in the context menu
  • Through Help Insight information invoked by hovering the mouse
  • Or just use Windows Search or a popular search tool
Woodhouse answered 1/2, 2019 at 8:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.