|
-
May 20th, 2001, 01:02 PM
#1
Thread Starter
Member
Problems with header files
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 ???
-
May 20th, 2001, 01:08 PM
#2
Frenzied Member
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?
-
May 20th, 2001, 01:09 PM
#3
Monday Morning Lunatic
You need windef.h as well. Why can't you just use windows.h?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
May 20th, 2001, 01:19 PM
#4
Thread Starter
Member
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;
-
May 20th, 2001, 04:32 PM
#5
Monday Morning Lunatic
Use:
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
That should work. For nearly anything that's declared, always use windows.h.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|