2013-07-26 111 views
1

我正在嘗試新的設置。我在32位Windows 8 Pro筆記本電腦上。我已經下載了MinGW-builds的GCC 4.8.1。我用它來編譯LLVM & CLang(從中繼的SVN副本3.4+以上)。這兩個都在我的路徑中。如何爲Windows和CodeLite設置wxWidgets?

我已經下載了CodeLite 5.2,它附帶了MinGW/GCC 4.7.1的副本。我得到了純控制檯教程示例,但我無法獲得wxWidgets示例的工作。 (這是Quick Start。)我下載了&安裝了wxWidgets。 (總是第一步。)我用MinGW-4.8.1構建它。我已閱讀錯誤說明,並在「.. \ build \ msw \ gcc_mswud」的「C:\ wxWidgets-2.9.5」和WXCFG處添加了兩個(第一本地,現在的系統)環境變量:WXWIN。 (我最初認爲WXCFG將是一個絕對路徑,但它是基於「%WXWIN%\lib\」。)我將MinGW和LLVM構建從「C:\ Program Files」移到「C:\」以避免在它們的空間中路徑。

這裏是(仍然)錯誤輸出,當我建立與F7:

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上,而不是標準輸出?)

更新

上移動到我的實際工作後,我得到了錯誤,並注意到CodeLite仍在使用的MinGW 4.7.1與來CodeLite下載,而不是使用我下載的4.8.1。我可能通過將搜索目錄更改爲我的4.8.1來搞砸了。我想我要刪除所有內容並重新開始......

+0

難道這項工作?我得到相同的錯誤 – Gary

回答

0

錯誤消息似乎表明WXCFG環境變量未設置,您是否在設置IDE後重新啓動IDE?請記住,編輯環境變量不會爲已經運行的進程更改它們。

+0

是的,多次,每次修補後。 – CTMacUser

1

Windows的wx-config.exe工具使用2個環境變量: WXCFG和WXWIN 您需要提供它們以使wx-config.exe能夠找到wx-config文件。 推薦的方法是將它們設置在IDE中而不是系統範圍內。

要做到這一點,從主菜單中,請訪問: 設置 - >環境變量

,並添加2項:

WXWIN=\Path\to\wxWidgets\Folder 
WXCFG=gcc_dll\mswu 

另外,你提到codelite使用GCC4.7.1而不是你的4.8.1。您應該知道,在Windows上使用GCC時,您應該使用相同的GCC版本構建所有組件。所以請確保您不使用我們(codelite團隊)提供的wxWidgets,因爲它是使用GCC4.7.1構建的,或者您可能會遇到一些奇怪的崩潰。

要強制codelite使用另一個GCC,只需從codelite內改變的路徑:

設置 - >環境變量

PATH=\Path\To\MinGW-4.8.1\bin;$PATH 

葉蘭

+1

我得到了MinGW-4.8.1-Builds部分工作,但不是wxWidgets部分。 CodeLite使用「WXWIN」設置,但忽略「WXCFG」部分,就好像它不在那裏一樣。 (通過錯誤信息我知道它使用'WXWIN'。)我甚至將這兩個變量從用戶/系統控制面板中取出。它是否與正在編譯的wxWidgets需要WXCFG = gcc_lib \ mswud而不是您的(和CodeLite的)默認值? – CTMacUser