[英]Making WxWidgets work in C++
I installed precompiled WxWidget libraries and tried to run the default program in CodeBlocks but it gives the following error: 我安装了预编译的WxWidget库,并尝试在CodeBlocks中运行默认程序,但它出现以下错误:
mingw32-g++.exe: error: bin\Release\new2.exe: No such file or directory
Paths for WxWidget Libraries and MinGW are already specified. WxWidget库和MinGW的路径已经指定。 My question is;
我的问题是; How to make CodeBlocks generate a .exe file for WxWidgets project?
如何使CodeBlocks为WxWidgets项目生成.exe文件?
I have already tried all solutions listed in this question: "No such file or directory" error in CodeBlocks 我已经尝试过此问题中列出的所有解决方案: CodeBlocks中出现“无此文件或目录”错误
Complete Build Log: 完整的构建日志:
-------------- 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
Here's the problem. 这是问题所在。 The
-L
flag requires an argument, but the usual argument (a directory to search for libraries) is not provided. -L
标志需要一个参数,但是没有提供通常的参数(用于搜索库的目录)。 So the next flag, -o
, is interpreted as an argument to -L
, and bin\\Release\\new2.exe
is interpreted as a name of an input file, which of course doesn't exist yet. 因此,下一个标志
-o
被解释为-L
的参数,而bin\\Release\\new2.exe
被解释为输入文件的名称,当然这还不存在。
Check your compiler flags and make sure there's no stray -L
anywhere, and no "additional libraries directory" is specified as a white space string or similar. 检查您的编译器标志,并确保在任何地方都没有杂散的
-L
,并且没有将“其他库目录”指定为空格字符串或类似字符。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.