簡體   English   中英

使WxWidgets在C ++中工作

[英]Making WxWidgets work in C++

我安裝了預編譯的WxWidget庫,並嘗試在CodeBlocks中運行默認程序,但它出現以下錯誤:

    mingw32-g++.exe: error: bin\Release\new2.exe: No such file or directory

WxWidget庫和MinGW的路徑已經指定。 我的問題是; 如何使CodeBlocks為WxWidgets項目生成.exe文件?

我已經嘗試過此問題中列出的所有解決方案: CodeBlocks中出現“無此文件或目錄”錯誤

完整的構建日志:

-------------- Build: Release in new2 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wno-unused-
local-typedefs -Wall -O2 -ID:\WxWidgets\wxWidgets2.8\include -I\msw -c 
C:\Users\ShifaShah\Documents\new2\new2App.cpp -o obj\Release\new2App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wno-unused-
local-typedefs -Wall -O2 -ID:\WxWidgets\wxWidgets2.8\include -I\msw -c 
C:\Users\ShifaShah\Documents\new2\new2Main.cpp -o obj\Release\new2Main.o
windres.exe -ID:\WxWidgets\wxWidgets2.8\include -I\msw  -J rc -O coff -i 
C:\Users\SHIFAS~1\DOCUME~1\new2\resource.rc -o obj\Release\resource.res
mingw32-g++.exe -L -o bin\Release\new2.exe obj\Release\new2App.o 
obj\Release\new2Main.o  obj\Release\resource.res -s -mthreads  -lwxmsw_core -lwxbase -lwxpng -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -
ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows
mingw32-g++.exe: error: bin\Release\new2.exe: No such file or directory
Process terminated with status 1 (0 minute(s), 3 second(s))
1 error(s), 0 warning(s) (0 minute(s), 3 second(s))
 -L -o bin\Release\new2.exe

這是問題所在。 -L標志需要一個參數,但是沒有提供通常的參數(用於搜索庫的目錄)。 因此,下一個標志-o被解釋為-L的參數,而bin\\Release\\new2.exe被解釋為輸入文件的名稱,當然這還不存在。

檢查您的編譯器標志,並確保在任何地方都沒有雜散的-L ,並且沒有將“其他庫目錄”指定為空格字符串或類似字符。

暫無
暫無

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

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