Codelite构建错误:“没有这个文件或目录”

3

我是一个 Codelite 编程新手,我使用 wxCrafter 创建了一些简单的框架,但是 Codelight 无法安装(是的,我已经安装了 MinGW,并在控制台程序上工作)。 我认为我可能在框架上犯了错误,于是我决定创建一个新项目而不改变任何内容,然后构建这个项目。我收到了相同的错误代码:

C:\Windows\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  Makefile
"----------Building project:[ Test - Debug ]----------"

Please use the --prefix flag (as in wx-config --prefix=C:/wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:/wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:/wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:/wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:/wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:/wxWidgets)
to specify where is your installation of wxWidgets.
mingw32-make.exe[1]: Entering directory 'C:/Users/user/Documents/CodeLite/Gravitation_Simulator/Test'
g++.exe: error: wx-config: No such file or directory
g++.exe: error: Error:: Invalid argument
g++.exe: error: wxWidgets: No such file or directory
g++.exe: error: hasn't: No such file or directory
g++.exe: error: been: No such file or directory
g++.exe: error: found: No such file or directory
g++.exe: error: installed: No such file or directory
g++.exe: error: at: No such file or directory
g++.exe: error: 'C:\Program: Invalid argument
g++.exe: error: Files'.: No such file or directory
mingw32-make.exe[1]: *** [Debug/main.cpp.o.d] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
g++.exe: error: wx-config: No such file or directory
g++.exe: error: Error:: Invalid argument
g++.exe: error: wxWidgets: No such file or directory
g++.exe: error: hasn't: No such file or directory
g++.exe: error: been: No such file or directory
g++.exe: error: found: No such file or directory
g++.exe: error: installed: No such file or directory
g++.exe: error: at: No such file or directory
g++.exe: error: 'C:\Program: Invalid argument
g++.exe: error: Files'.: No such file or directory
Test.mk:99: recipe for target 'Debug/main.cpp.o.d' failed
mingw32-make.exe[1]: *** [Debug/MainFrame.cpp.o.d] Error 1
g++.exe: error: wx-config: No such file or directory
g++.exe: error: Error:: Invalid argument
g++.exe: error: wxWidgets: No such file or directory
g++.exe: error: hasn't: No such file or directory
g++.exe: error: been: No such file or directory
g++.exe: error: found: No such file or directory
g++.exe: error: installed: No such file or directory
g++.exe: error: at: No such file or directory
g++.exe: error: 'C:\Program: Invalid argument
g++.exe: error: Files'.: No such file or directory
mingw32-make.exe[1]: *** [Debug/wxcrafter.cpp.o.d] Error 1
mingw32-make.exe: *** [All] Error 2
Test.mk:107: recipe for target 'Debug/MainFrame.cpp.o.d' failed
Test.mk:115: recipe for target 'Debug/wxcrafter.cpp.o.d' failed
mingw32-make.exe[1]: Leaving directory 'C:/Users/user/Documents/CodeLite/Gravitation_Simulator/Test'
Makefile:4: recipe for target 'All' failed
====1 errors, 0 warnings====`

新项目 -> GUI -> wxWidgets GUI 应用程序 (wxFrame,使用 wxCrafter) -> 构建 (代码未被修改) - 9Strike
我们并不都能访问您的IDE,也不知道它通过您提到的那些步骤生成了什么。因此,请展示代码。另外,您是否注意到了反复的请求“请使用--prefix标志...”?您是否考虑过按照它所说的去做是个好主意呢? - Jesper Juhl
正如我所写的,这里没有我的代码。我认为这是一个IDE特定的问题,也因为它说“请使用...”。但我不知道这意味着什么或如何修复它。 - 9Strike
1个回答

1
问题不在于MinGW。 你需要设置环境变量WXCFGWXWIN。 你可以在CodeLite中完成此操作:设置->环境变量 例如,如果你在C:\src\wxWidgets下安装了wxWidgets开发包
你应该像这样在CodeLite的环境变量部分添加2个条目:
WXCFG=gcc_dll\mswu
WXWIN=C:\src\wxWidgets

这应该会为您解决这些警告。

Eran


好的,谢谢。但是我收到了致命错误:"检测到程序和库构建版本不匹配。库使用了 3.1.0(wchar_t,编译器带有 C++ ABI 1002,wx 容器,与 3.0 兼容),而您的程序使用了 3.1.0(wchar_t,编译器带有 C++ ABI 1008,wx 容器,与 3.0 兼容)"。我使用了这个 wxWidgets 库:链接 - 9Strike
我刚在codelite论坛上发布了一篇新帖子,我认为最好在那里解决这个问题:http://codelite.org/forum/viewtopic.php?f=3&t=3413 - 9Strike

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接