Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Fun with compiler errors

Fun with compiler errors

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpc++visual-studiohelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adonisv
    wrote on last edited by
    #1

    I'm getting these errors as I try to upgrade an visual studio 6.0 project to .NET. :sigh: 1)"error C2628: 'wchar_t' followed by 'unsigned' is illegal (did you forget a ';'?)" which points to this part of the code typedef wchar_t WCHAR; // wc, 16-bit UNICODE character in the "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h" file 2) "error C2371: 'BOOLEAN' : redefinition; different basic types." which points to this part of the code typedef BYTE BOOLEAN; in the "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h file." and last but NOT least, 3) "error C2371: 'BOOLEAN' : redefinition; different basic types." which points to this part of the code /* For backward compatibility */ typedef VARIANT_BOOL _VARIANT_BOOL; #else /* ANSI C/C++ reserve bool as keyword */ #define _VARIANT_BOOL /##/ #endif typedef boolean BOOLEAN; in the "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WTypes.h file." Is there a way to NOT include these files when I compile? :omg:

    E 1 Reply Last reply
    0
    • A adonisv

      I'm getting these errors as I try to upgrade an visual studio 6.0 project to .NET. :sigh: 1)"error C2628: 'wchar_t' followed by 'unsigned' is illegal (did you forget a ';'?)" which points to this part of the code typedef wchar_t WCHAR; // wc, 16-bit UNICODE character in the "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h" file 2) "error C2371: 'BOOLEAN' : redefinition; different basic types." which points to this part of the code typedef BYTE BOOLEAN; in the "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h file." and last but NOT least, 3) "error C2371: 'BOOLEAN' : redefinition; different basic types." which points to this part of the code /* For backward compatibility */ typedef VARIANT_BOOL _VARIANT_BOOL; #else /* ANSI C/C++ reserve bool as keyword */ #define _VARIANT_BOOL /##/ #endif typedef boolean BOOLEAN; in the "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WTypes.h file." Is there a way to NOT include these files when I compile? :omg:

      E Offline
      E Offline
      Eric Reynolds
      wrote on last edited by
      #2

      There's an easy way to stop WTypes.h not being included and that is to #define __wtypes_h__ at the beginning of your source file, or even just add __wtypes_h__ as a defined macro in your project settings. This may well not solve your problems, however.

      A 2 Replies Last reply
      0
      • E Eric Reynolds

        There's an easy way to stop WTypes.h not being included and that is to #define __wtypes_h__ at the beginning of your source file, or even just add __wtypes_h__ as a defined macro in your project settings. This may well not solve your problems, however.

        A Offline
        A Offline
        adonisv
        wrote on last edited by
        #3

        Ok I'll try that thanks... :-D

        1 Reply Last reply
        0
        • E Eric Reynolds

          There's an easy way to stop WTypes.h not being included and that is to #define __wtypes_h__ at the beginning of your source file, or even just add __wtypes_h__ as a defined macro in your project settings. This may well not solve your problems, however.

          A Offline
          A Offline
          adonisv
          wrote on last edited by
          #4

          That actually gave me more errors. :doh: Where would you suggest putting this macro in the project settings? Under which tab?? :~

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups