首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何为Windows和CodeLite设置CodeLite?

如何为Windows和CodeLite设置CodeLite?
EN

Stack Overflow用户
提问于 2013-07-26 12:40:12
回答 2查看 11K关注 0票数 3

我在尝试一个新的设置。我在32位Windows 8 Pro笔记本电脑上。我下载了MinGW-builds‘GCC 4.8.1。我使用它编译LLVM & CLang (从主干的SVN副本编译3.4+)。这两个都挡在我的路上。

我下载了CodeLite 5.2,它附带了MinGW/GCC 4.7.1的副本。我让纯控制台教程示例工作,但我无法让wxWidgets示例工作。(是快速入门。)我下载并安装了wxWidgets。(总是很好的第一步。)我用MinGW-4.8.1建造的。我阅读了错误注释,并添加了两个环境变量(第一个是本地的,现在是系统):WXWIN在“C:\wxWidget-2.9.5”,WXCFG在"..\build\msw\gcc_mswud“。(我最初认为WXCFG是一条绝对的路径,但它是基于“%WXWIN%\lib\”的。)我将我的MinGW和LLVM构建从"C:\Program“移到"C:\”,以避免在它们的路径中有空间。

下面是使用F7构建时的(仍然)错误输出:

代码语言:javascript
复制
C:\WINDOWS\system32\cmd.exe /c "mingw32-make.exe -j 2 -e -f  Makefile"
"----------Building project:[ Test1_2 - Debug ]----------"

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/test1_2_frame.o.d] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [Debug/test1_2_app.o.d] Error 1
Test1_2.mk:102: recipe for target `Debug/test1_2_frame.o.d' failed
Test1_2.mk:94: recipe for target `Debug/test1_2_app.o.d' failed
mingw32-make.exe[1]: Leaving directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target `All' failed
0 errors, 0 warnings

在某个时候,编译器步骤发出错误消息,下一步将其解释为实际参数!(应该将错误发送到stderr而不是stdout吗?)

更新

在继续我的实际工作之后,我发现了一些错误,并注意到CodeLite仍然在使用MinGW 4.7.1,这是与CodeLite下载一起的,而不是使用我下载的4.8.1。通过将搜索目录更改为4.8.1,我可能会把事情搞砸。我想我要抹去一切,重新开始.

EN

回答 2

Stack Overflow用户

发布于 2013-07-27 04:35:45

用于Windows的wx-config.exe工具使用两个环境变量: WXCFG和WXWIN,您需要提供它们,以便wx-config.exe能够定位WXCFG文件。推荐的方法是在IDE中而不是在系统范围内设置它们。

为此,从主菜单中转到:设置->环境变量

并增加2个条目:

代码语言:javascript
复制
WXWIN=\Path\to\wxWidgets\Folder
WXCFG=gcc_dll\mswu

此外,您还提到codelite使用的是GCC4.7.1,而不是4.8.1。您应该知道,在Windows上与GCC一起工作时,您的所有组件都应该使用相同的GCC版本构建。因此,确保您没有使用我们(codelite team)提供的wxWidgets,因为它是用GCC4.7.1构建的,否则您可能会遇到一些奇怪的崩溃。

要强迫编解码器使用另一个GCC,只需改变代码内部的路径:

设置->环境变量

代码语言:javascript
复制
PATH=\Path\To\MinGW-4.8.1\bin;$PATH

埃兰

票数 3
EN

Stack Overflow用户

发布于 2013-07-26 14:31:27

错误消息似乎表明没有设置WXCFG环境变量,您是否在设置它之后重新启动它?记住,编辑环境变量不会因为已经在运行的进程而改变它们。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17881566

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档