I have the following error when compiling :
c:\program files (x86)\windows kits\8.0\include\um\winnt.h(146): fatal error C1189: #error : "No Target Architecture"
Anyway I do not use Windows Kit in my project (or I didn't see it was included). And I tried to change the architecture target in my project with 32, 64 bits, and inherited. Nothing does. Any idea ?
EDIT : list of all the includes. The two first lines are from my project.
1> Remarque : inclusion du fichier : d:\visual studio 2012\netsdk_poc\mfc_netsdk2\mfc_netsdk2\stdafx.h
1> Remarque : inclusion du fichier : d:\visual studio 2012\netsdk_poc\mfc_netsdk2\mfc_netsdk2\Libs\\netsdk.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stddef.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\sal.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ConcurrencySal.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vadefs.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\windef.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\winapifamily.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\minwindef.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\specstrings.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\specstrings_strict.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\specstrings_undef.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\driverspecs.h
1> Remarque : inclusion du fichier : c:\program files (x86)\windows kits\8.0\include\shared\sdv_driverspecs.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ctype.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h
1> Remarque : inclusion du fichier : C:\Program Files (x86)\Windows Kits\8.0\Include\shared\kernelspecs.h
The error lines say
#if defined(_AMD64_) || defined(_X86_)
#define PROBE_ALIGNMENT( _s ) TYPE_ALIGNMENT( DWORD )
#elif defined(_IA64_) || defined(_ARM_)
#define PROBE_ALIGNMENT( _s ) (TYPE_ALIGNMENT( _s ) > TYPE_ALIGNMENT( DWORD ) ? \
TYPE_ALIGNMENT( _s ) : TYPE_ALIGNMENT( DWORD ))
#elif !defined(RC_INVOKED)
#error "No Target Architecture"
#endif
You have #included that header, possibly indirectly by including another header.
You can tell VS2012 to list all the includes it uses by setting "Show Includes" to yes in the Properties | C/C++ | Advanced
project menu. Then try not including the header that is dragging in winnt.h
if you don't need it.
winnt.h
can cause trouble e.g. see here
edit
So, the precompile header includes windef.h which includes the offending header. Try removing the line from the precompiled header.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With