为 64 位版本构建 WxWidgets 应用程序时出现 Visual Studio 2019 错误

问题描述

我使用 Visual Studio Community 2019 for Windows 和 WxWidgets 3.1.5。在“VS 2019 开发人员命令提示符”中,我使用

构建了 WxWidgets
>nmake /f makefile.vc RUNTIME_LIBS=static BUILD=release TARGET_cpu=X86
>nmake /f makefile.vc RUNTIME_LIBS=static BUILD=debug TARGET_cpu=X86
>nmake /f makefile.vc RUNTIME_LIBS=static BUILD=release TARGET_cpu=X64
>nmake /f makefile.vc RUNTIME_LIBS=static BUILD=debug TARGET_cpu=X64

当我尝试使用 /MT 和 x86 调试或发布配置构建应用程序时,我没有错误,但是当我尝试使用 x64 编译器构建应用程序时,调试和发布都在“类型.h”文件

错误 E1256 __w64 只能在 int、long 和指针类型中指定。

我该如何解决

解决方法

也许在大约 1,30 小时后我找到了问题,我想我可以找到解决方案,问题是 WxWidgets 构建,出于某种原因,我不太明白,应该编译的库在 64 位中编译为 32 位,我不知道这是否是真正的问题,但它可能仍然是其中的一部分。通过一些研究,我发现了一些以前隐藏的错误消息:"1> C: \ Downloaded_Libraries \ WxWidgets \ wxWidgets-3.1.5_Static \ lib \ vc_x64_lib \ wxmsw31ud_gl.lib: warning LNK4272: the 'x86' type of the library computer conflicts with the 'x64' type of the target computer"