Click to See Complete Forum and Search --> : Problems with header files
jesper
May 20th, 2001, 01:02 PM
when i use #include directive to add some headers files to my project (winbase.h, winnt.h), while compiling, there are many errors in these files found. How is this possible ???
Vlatko
May 20th, 2001, 01:08 PM
We won't be able to answer anything until you post the code and the errors.
You did include the file in angle brackets, right?
parksie
May 20th, 2001, 01:09 PM
You need windef.h as well. Why can't you just use windows.h?
jesper
May 20th, 2001, 01:19 PM
i wanted to use something declared in winnt.h and winbase.h (i found it in MSDN)I wanted to use LARGE_INTEGER type.
--------------------Configuration: CONSOLE_counting - Win32 Release--------------------
Compiling...
CONSOLE_counting.cpp
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) : error C2146: syntax error : missing ';' before identifier 'WCHAR'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Release\CONSOLE_counting.sbr': No such file or directory
Error executing bscmake.exe.
CONSOLE_counting.exe - 3 error(s), 0 warning(s)
winnt.h:
typedef WCHAR *PWCHAR;
typedef WCHAR *LPWCH, *PWCH;
->typedef CONST WCHAR *LPCWCH, *PCWCH;
typedef WCHAR *NWPSTR;
typedef WCHAR *LPWSTR, *PWSTR;
parksie
May 20th, 2001, 04:32 PM
Use:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
That should work. For nearly anything that's declared, always use windows.h.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.