2012-04-20 66 views
1

小時後我終於可以編譯wxWidgets的-2.8.12庫如下: -wxWidgets的應用程序運行失敗

我解壓的.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 

它構建/編譯成功地然後我在項目屬性添加 - >包括目錄 - > d:\ wxwidgets2812 \ wxWidgets的-2.8.12 \包括addidtional選項 - >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) 

請幫我運行應用程序。 感謝

+0

爲什麼不去wxWidgets 2.9.x.既然你在窗戶上,我會建議Visual Studio。這會讓你的工作更簡單。這可以幫助http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide – 2012-04-21 04:28:06

回答

1

「這可能表明無需.dll文件在PATH中找到」

這表明您已經構建了應用程序鏈接到包含wxWidgets庫的DLL。

你可以從這裏去兩種方式:

  1. 更改您的應用程序生成靜態鏈接到庫中。如果您尚未這樣做,您還必須構建wxWidgets以生成靜態庫。

  2. 將wxWidgets DLL複製到您的路徑中。 (或DLL文件夾速戰速決,讓你開始添加到您的路徑。)

選項#2可能是現在簡單,因爲你似乎已經建成的wxWidgets的DLL版本。因此,您需要找到在構建wxWidgets時將其創建並將其移動到路徑中的wxWidgets DLL。

+0

靜態你的意思是我需要重新編譯wxwidgets靜態構建(SHARED = 0)是什麼意思 2.複製wxwidgets DLL進入你的路徑 - >不清楚你指向哪個DLL。 – 2012-04-20 13:04:20

+0

我有一個路徑爲D:\ wxwidgets \ wxwidgets-2.8.12 \ lib \ gcc_dll \ msw gcc_dll下有10個dll,據我瞭解你的意思是我需要添加「D:\ wxwidgets \路徑變量中的wxwidgets-2.8.12 \ lib \ gcc_dll \「 – 2012-04-20 13:14:51

+0

添加到路徑中對於啓動而言是最簡單的。如果你決定繼續使用DLL,你應該考慮整體構建。 – ravenspoint 2012-04-20 13:29:26

相關問題