WxWidgets 应用程序运行失败

WxWidgets Application Run Failed

本文关键字:失败 运行 应用程序 WxWidgets      更新时间:2023-10-16

几个小时后,我终于能够编译wxwidgets-2.8.12库,如下所示:

我将.zip解压缩到文件夹 D:\wxwidgets2812\wxwidgets-2.8.12

我进入 D:\MinGW\MSYS\1.0 运行批处理文件并执行以下操作:-

转到以下路径:-

 cd /d/{WXWIN}/build/msw 

并按以下方式编译库:-

 mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=1 UNICODE=0 BUILD=release

它成功构建/编译然后我在项目属性中添加了 ->include 目录 ->D:\wxwidgets2812\wxwidgets-2.8.12\include ,addidtional options-> wx-config --cxxflags ,在链接器中添加了库 -> wx-config --libs

  Now when i run my code / project ,it gives me following errors:-
 The application failed with exit code -1073741515 (0xc0000135). 
 This could indicate that no required .dll was found in the PATH. 
 Please try to start the following command from the command shell (cmd.exe). 
 This may give some additional information. 
 C:UsersLenovoDocumentsNetBeansProjectsCppApplication_6distDebugMinGW_1-    
 Windowscppapplication_6 
 RUN FAILED (exit value -1,073,741,515, total time: 22ms)

请帮我运行应用程序。谢谢

"这可能表示在 PATH 中找不到所需的.dll"

这表明您已将应用程序构建为链接到包含 wxWidgets 库的 DLL。

您可以从这里走两条路:

  1. 将应用程序生成更改为静态链接到库。 您还必须构建 wxWidgets 来生成静态库(如果尚未这样做)。

  2. 将 wxWidgets DLL 复制到您的路径中。(或将 DLL 文件夹添加到您的路径中,作为快速修复以帮助您入门。

选项 #2 现在可能更简单,因为您似乎已经构建了 wxWidgets 的 DLL 版本。 因此,您需要找到在构建wxWidgets时创建的wxWidgets DLL,并将其移动到您的路径中。