Introduction
This article describes a problem that occurs if you include the "errno.h" and "winsock.h" header files in your C++ code in Windows Embedded Compact 2013. An update is available to resolve this problem. Before you install this update, all previously issued updates for this product must be installed.
Symptoms
Assume that you use the Windows Embedded Compact 2013 SDK to create a Console project in Visual Studio 2012. When you include both the "errno.h" and "winsock.h" header files in your C++ code, and then build the project, you receive the following warning message:
Macro Redefinition
Cause
This problem occurs because the values for the error codes that are defined in the errno.h and winsock.h headers files do not match between the files.
Examples of error codes
From the errno.h header file:
#define EWOULDBLOCK 140
From the winsock.h header file:
#define WSAEWOULDBLOCK 10035L
#define EWOULDBLOCK WSAEWOULDBLOCKThe following is a code example to retrieve the error codes:
#include <errno.h>
#include <winsock.h> int wmain(int argc, wchar_t *argv[]) { printf("Welcome to Windows Embedded Project System \n"); return 0; }
Software update information
Download information
Windows Embedded Compact 2013 Monthly Update (April 2015) is now available from Microsoft. To download this Windows Embedded Compact 2013 monthly update, go to Microsoft OEM Online or MyOEM.
Prerequisites
This update is supported only if all previously issued updates for this product have also been installed.
Restart requirement
After you apply this update, you must perform a clean build of the whole platform. To do this, use one of the following methods:
-
On the Build menu, click Clean Solution, and then click Build Solution.
-
On the Build menu, click Rebuild Solution.
You do not have to restart the computer after you apply this software update.
Update replacement information
This update does not replace any other updates.
The English version of this software update package has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Files that are included in this update package
File name |
File size |
Date |
Time |
Path |
---|---|---|---|---|
Errno.h |
3,453 |
02-Apr-2015 |
09:23 |
Public\Common\Sdk\Crt\Include |
Winsock.h |
33,605 |
02-Apr-2015 |
09:23 |
Public\Common\Sdk\Inc |
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminology that Microsoft uses to describe software updates.