winbase.h in console apps

Started by
11 comments, last by Vaporisator 22 years, 5 months ago
So I am talking about VC6. My problem is: - I make a fresh new and empty console app (Win32 of course) - then add an empty .cpp file - then I include iostream.h - and then I am so perkily to include winbase.h If I am trying to compile this, I get 74 errors in winbase.h, mostly about missing definitions (DWORD, WORD, wYear,...), missing brackets, missing semi-colons, etc. What the heck is going on? Shouldn''t at least the standard M$ headers work (actually they work in non-console apps)? Thanx in advance for saving my keyboard and my teeth Yesterday we still stood at the verge of the abyss, today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
Advertisement
Try inlcuding windows.h as well.
Thanx that worked perfectly!
But why doesn''t winbase.h include windows.h on its own?


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
You know, I have no idea actually.

Edited by - Red Ant on October 16, 2001 6:39:12 PM
Strange problem, but now that I know how to avoid it...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
I belive that windows.h includes winbase.h (or something that it includes does)
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
I dont think winbase.h is intended for direct inclusion in a user program. Same goes for a lot of the other windows include files. Save yourself some trouble and just include windows.h.

"A society without religion is like a crazed psychopath without a loaded .45"
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Well, it''s just because MSDN said, the relevant include would be winbase.h


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
MSDN usually says something like this: "Declared in winbase.h, include windows.h"

"A society without religion is like a crazed psychopath without a loaded .45"
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Excerpt from MSDN for ''GetTickCount'':
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.


so...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!

This topic is closed to new replies.

Advertisement