Results 1 to 5 of 5

Thread: Problems with header files

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    50

    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 ???

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    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?
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    50
    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;

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
  •  



Click Here to Expand Forum to Full Width