簡體   English   中英

為 64 位版本構建 WxWidgets 應用程序時出現 Visual Studio 2019 錯誤

[英]Visual Studio 2019 error when build WxWidgets app for 64 bit version

我將 Visual Studio Community 2019 用於 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 編譯器構建應用程序時,調試和發布都會在“types.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"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM