使 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文件?
我已经尝试过这个问题中列出的所有解决方案:"No such file or directory" error in 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
,并且没有 "additional libraries directory" 被指定为白色 space 字符串或类似字符串。
我安装了预编译的 WxWidget 库并尝试 运行 CodeBlocks 中的默认程序,但出现以下错误:
mingw32-g++.exe: error: bin\Release\new2.exe: No such file or directory
WxWidget 库和 MinGW 的路径已经指定。 我的问题是;如何让CodeBlocks为WxWidgets项目生成.exe文件?
我已经尝试过这个问题中列出的所有解决方案:"No such file or directory" error in 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
,并且没有 "additional libraries directory" 被指定为白色 space 字符串或类似字符串。