简体   繁体   English

WxWidgets应用程序运行失败

[英]WxWidgets Application Run Failed

After hours i was finally able to compile the wxwidgets-2.8.12 library as follows:- 几个小时后,我终于能够按如下所示编译wxwidgets-2.8.12库:

I unzipped the .zip into a folder D:\\wxwidgets2812\\wxwidgets-2.8.12 我将.zip解压缩到文件夹D:\\ wxwidgets2812 \\ wxwidgets-2.8.12

I went in D:\\MinGW\\MSYS\\1.0 run the batch file and did the following:- 我进入D:\\ MinGW \\ MSYS \\ 1.0运行批处理文件,并执行以下操作:

Went to the following path:- 转到以下路径:

 cd /d/{WXWIN}/build/msw 

and compiled the library in the following way as :- 并以以下方式编译该库:

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

It Build /Compiled succesfully Then I added in the project properties ->include directories ->D:\\wxwidgets2812\\wxwidgets-2.8.12\\include ,addidtional options-> wx-config --cxxflags ,in linker i added in libraries-> wx-config --libs 它成功构建/编译,然后我在项目属性中添加了-> include目录-> D:\\ wxwidgets2812 \\ wxwidgets-2.8.12 \\ include,附加选项-> 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:\Users\Lenovo\Documents\NetBeansProjects\CppApplication_6\dist\Debug\MinGW_1-    
 Windows\cppapplication_6 

 RUN FAILED (exit value -1,073,741,515, total time: 22ms)

Please help me running the application. 请帮助我运行该应用程序。 Thanks 谢谢

" This could indicate that no required .dll was found in the PATH" “这可能表明在PATH中找不到所需的.dll”

This suggests that you have built your application to link to a DLL containing the wxWidgets library. 这表明您已经构建了应用程序以链接到包含wxWidgets库的DLL。

You can go two ways from here: 您可以从此处进行两种方式:

  1. Change your application build to link statically to the library. 更改您的应用程序构建以静态链接到库。 You will also have to build wxWidgets to generate a static library if you have not already done so. 如果还没有生成,则还必须构建wxWidgets来生成静态库。

  2. Copy the wxWidgets DLL into your path. 将wxWidgets DLL复制到您的路径中。 ( Or add the DLL folder to your path as a quick fix to get you started. ) (或将DLL文件夹添加到您的路径中,以作为快速入门的开始。)

Option #2 is probably simpler for now, since you seem to have built the DLL version of wxWidgets. 现在,选项2可能更简单,因为您似乎已经构建了wxWidgets的DLL版本。 So, you need to find the wxWidgets DLL that was created when you built wxWidgets and move it into your path. 因此,您需要找到在构建wxWidgets时创建的wxWidgets DLL并将其移入路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM