diff --git a/build/bakefiles/common.bkl b/build/bakefiles/common.bkl
index 4d92fee785..f4b76863d6 100644
--- a/build/bakefiles/common.bkl
+++ b/build/bakefiles/common.bkl
@@ -396,6 +396,15 @@
+
+
+
+ TARGET_CPU_COMPFLAG=0
+
+
+
+
+
$(DEBUGINFO)
$(DEBUGRUNTIME)
@@ -423,6 +432,7 @@
$(WIN32_DPI_LINKFLAG)
$(LINK_TARGET_CPU)
+ $(TARGET_CPU_COMPFLAG)
diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h
index abf12efc45..0c9b1acf41 100644
--- a/include/wx/msw/chkconf.h
+++ b/include/wx/msw/chkconf.h
@@ -13,6 +13,13 @@
#ifndef _WX_MSW_CHKCONF_H_
#define _WX_MSW_CHKCONF_H_
+/* ensure that CPU parameter is specified (only nmake .vc makefile) */
+#ifdef _MSC_VER
+ #if defined(_WIN64) && defined(TARGET_CPU_COMPFLAG) && (TARGET_CPU_COMPFLAG == 0)
+ #error CPU must be defined
+ #endif
+#endif
+
/* ensure that MSW-specific settings are defined */
#ifndef wxUSE_ACTIVEX
# ifdef wxABORT_ON_CONFIG_ERROR