RC4011 warnings from VC10 RC - by Numpsy

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 532929 Comments
Status Closed Workarounds
Type Bug Repros 6
Opened 2/11/2010 9:40:42 AM
Access Restriction Public


While building one of my projects in the VC10 RC, i get a couple of RC4011 warnings from MS headers:

C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string.h(54): warning RC4011: identifier truncated to '_CRT_SECURE_CPP_OVERLOAD_STANDA'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string.h(76): warning RC4011: identifier truncated to '_CRT_SECURE_CPP_OVERLOAD_SECURE'
Sign in to post a comment.
Posted by lz1234 on 1/17/2012 at 9:42 AM
Why this issue is by design? In my .rc, I include only afxres.h and I get the pair of warnings all the time. It's really annoying.

MS please fixes this.
Posted by kurtrayner on 4/26/2010 at 11:01 AM
As of VS 2010 RTM, if you include windows.h in a resource file, the RC4011 error is returned by the resource compiler.

"c:\dev\...\.vcxproj" (default target) (1) ->
     (ResourceCompile target) ->
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\memory.h(49): warning RC4011: identifier truncated to '_CRT_SECURE_CPP_OVERLOAD_STANDA' ...        
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\memory.h(71): warning RC4011: identifier truncated to '_CRT_SECURE_CPP_OVERLOAD_SECURE' ...

How does one include windows.h in an rc file without having memory.h included?
Posted by Microsoft on 2/24/2010 at 1:58 PM
Thank you for reporting this issue. It turns out this behavior is by design. Resource Compiler has several limitations because RC compiler supports only a subset of the statements a C compiler would support. To conditionally compile your code with the RC compiler, surround code that RC cannot compile with #ifndef RC_INVOKED and #endif.
For example in you test project, surround the #include string.h as follows
#ifndef RC_INVOKED
#include "string.h"

For more information related to the RC_INVOKED macro, refer to the documentation here http://msdn.microsoft.com/en-us/library/aa381032(VS.85).aspx

Nanda Lella (Windows C++)
Posted by Microsoft on 2/15/2010 at 1:23 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by Numpsy on 2/12/2010 at 3:32 AM
Attached test1.zip, containing a project that shows the warning.
Posted by Numpsy on 2/12/2010 at 3:30 AM
It turns out that i'm seeing the warning from a .rc file that indirectly includes windef.h, but the same warning occurs if you #include "string.h" from a .rc file.
Posted by Microsoft on 2/11/2010 at 10:49 PM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Visual Studio Product Team