CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Posts
    218

    _WIN32_WCE isn't being defined? ERROR: cannot open include file 'winresrc.h'

    I need some help!

    I want to compile my app for WINCE, but I'm getting this one error:

    Code:
    Compiling resources...
    C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include/winres.h(33) : fatal error RC1015: cannot open include file 'winresrc.h'.
    I traced it to these lines in winres.h
    Code:
    #ifndef _WIN32_WCE
    #include <winresrc.h>
    #else // _WIN32_WCE
    #include <dlgs.h>
    #include <winbase.h>
    #include <commctrl.h>
    #include <resdefce.h>
    #endif // _WIN32_WCE
    It's entering that first ifndef case, but it should actually enter the else statement instead.

    My preprocessor has these command line options:
    Code:
    _DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);POCKETPC2003_UI_MODEL
    Shouldn't _WIN32_WCE be defined? It's the second option listed. Am I missing something?

    This is for a WinCE build for a PocketPC

    Thanks!

  2. #2
    Join Date
    Jun 2004
    Location
    India
    Posts
    432

    Re: _WIN32_WCE isn't being defined? ERROR: cannot open include file 'winresrc.h'

    Just for kicks, try this

    Code:
    instead of  _WIN32_WCE=$(CEVER), just try _WIN32_WCE
    Another possibility is that somewhere in your code, _WIN32_WCE is undefined.
    Say no to supplying ready made code for homework/work assignments!!

    Please rate this post!

  3. #3
    Join Date
    Aug 2005
    Posts
    218

    Re: _WIN32_WCE isn't being defined? ERROR: cannot open include file 'winresrc.h'

    Quote Originally Posted by UnderDog
    Just for kicks, try this

    Code:
    instead of  _WIN32_WCE=$(CEVER), just try _WIN32_WCE
    Another possibility is that somewhere in your code, _WIN32_WCE is undefined.
    Yes, I tried without the version as well, no luck. But I should definitely look and see if it's being undefined.

    thanks for the suggestions! =)

  4. #4
    Join Date
    Nov 2010
    Posts
    1

    Re: _WIN32_WCE isn't being defined? ERROR: cannot open include file 'winresrc.h'

    I know this was a long time ago... but the answer is to make sure the Preprocessor Definitions are correct in the Resources section of the Configuration Properties.

    You need
    NDEBUG
    _WIN32_WCE=$(CEVER)
    UNDER_CE
    $(PLATFORMDEFINES)

    Cheers!

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