none
winresrc.h?? RRS feed

  • Question

  •  

    I know what it is what I don't know is where it should be and why it isn't there :->. I have a small application that works on WindowsXP and I am trying to build it for Windows Mobile 5.0 using Visual Studio 2008 and I get the following error:

    Compiling resources...

    1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

    1>Copyright (C) Microsoft Corporation. All rights reserved.

    1>C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc\include\winres.h(33) : fatal error RC1015: cannot open include file 'winresrc.h'.

     

    Ok, what did I do wrong. (I can supply additional information if required).

    Wednesday, September 17, 2008 8:02 PM

Answers

  • It turns out that the problem was that the properties for the Windows Mobile 5.0 project was not completely modified. I overlooked one additional change. For the resource compiler, you need to make sure to include _WIN32_WCE=($CEVER) to the prepro option.
    The final clue came when I looked at the file trying to include winresrc.h and saw that the include was enclosed in
    #if !defined( _WIN32_WCE)
    ...
    #endif

    Initially I thought nothing of that. Then I thought wait _WIN32_WCE is defined and then I noticed that in addition to defining it for the compiler I needed to define it for the resource compiler as well.
    Duh.
    Friday, September 19, 2008 11:41 AM

All replies

  • Hi klotz,

    Try following setting:

    Tools->Options->VC++ Directories->Include Files(select mobile 5.0 platform)

     

    For more information, see following thread:

    http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=943390&SiteID=1

     

    Best regards,

    Guang-Ming Bian - MSFT

    Friday, September 19, 2008 6:12 AM
    Moderator
  • It turns out that the problem was that the properties for the Windows Mobile 5.0 project was not completely modified. I overlooked one additional change. For the resource compiler, you need to make sure to include _WIN32_WCE=($CEVER) to the prepro option.
    The final clue came when I looked at the file trying to include winresrc.h and saw that the include was enclosed in
    #if !defined( _WIN32_WCE)
    ...
    #endif

    Initially I thought nothing of that. Then I thought wait _WIN32_WCE is defined and then I noticed that in addition to defining it for the compiler I needed to define it for the resource compiler as well.
    Duh.
    Friday, September 19, 2008 11:41 AM
  • I know it's a few years late, but your problem really helped me, thank you. I was going nuts trying to figure out why the compiler was ignoring my _WIN32_WCE pre-processor directive and trying to include winresrc.h. I didn't realize there was a separate place for resource pre-processor directives.

    Configuration Properties -> Resources -> General -> Preprocessor Definitions

     

    Again, a BIG thank you. This has been a thorn in my side for two days.

    Wednesday, June 15, 2011 6:36 PM