CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: winnt.h

  1. #1
    Join Date
    Jun 2001
    Location
    CA
    Posts
    18

    winnt.h

    I am an experienced C (and VB) programmer but just started programming in VC++ (5.0). When I attempt a build I get two errors in winnt.h, which is apparently included automatically for W32. The errors are:
    C:\4Programming\DevStudio\VC\INCLUDE\winnt.h(2057) : error C2061: syntax error : identifier 'PCONTEXT'
    C:\4Programming\DevStudio\VC\INCLUDE\winnt.h(2058) : error C2059: syntax error : '}'
    I do not use PCONTEXT or any such variable, etc. Is there any way I can avoid including winnt.h? I've looked at it and see no problems in the area referenced.

    Ed Grens

  2. #2
    Join Date
    Apr 2000
    Location
    San Francisco, California, USA
    Posts
    4,467

    Re: winnt.h

    This may be caused by the incorrect order of #includes. Normally
    Win32 applications should include <windows.h> first and then all
    other header files (assuming that MFC is not used).


    Russian Software Development Network -- http://www.rsdn.ru

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

Featured