This topic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).
Several programming features that are specific to Windows* might result in errors when you use them in an offload compilation for Intel® MIC Architecture, even if you do not use these features in the code or data that is actually offloaded. When you use code with these features in your application, you must correctly structure the code so that it is not visible in a target compilation.
These features include, but are not limited to:
Windows calling conventions. For example:
extern void __cdecl foo(void);
Windows structured exception handling. For example:
void foo() { __try { 1/0; } __finally { printf("In finally\n"); } }
The storage-class attributes
dllexport
anddllimport
. For example:__declspec(dllexport) void foo(void);
Header files or libraries that are specific to Windows. For example:
#include <Windows.h>
In addition, you must take care to ensure that code does not depend on specific data size or order of allocation of classes, as these can vary between the host and the target.