我感觉有点笨,但我无法构建新的 wxWidgets。我想使用codelite + mingw + wxWidgets,所以我下载了最新版本:
CodeLite 9.1.3 ( http://downloads.codelite.org/downloads.php?windows_weekly_64 )
安装程序让我下载 TDM-GCC-64 设置并安装它。
然后我下载了 wxWidgets-3.1.0 ( https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxMSW-3.1.0-Setup.exe )
Codelite 检测到编译器,现在我应该构建 wxWidgets,但是我搜索过的页面(wxW wiki、codelite 文档等)指的是不存在的文件夹和文件。一切都安装在默认文件夹中,我不是 PC 菜鸟,虽然可能太习惯于 C++Builder 等环境。
我现在该怎么办?
更新
对不起,我无法说清楚。让我再试一次输出:
C:\wxWidgets-3.1.0\build\msw>mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=1 BUILD=release VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLITHIC=1
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
gcc -c -o gcc_mswudll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__ -D_UNICODE -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxre
gex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
Impossibile trovare il percorso specificato.
0 file copiati.
Makefile.gcc:5728: recipe for target '..\..\lib\gcc_dll\mswu\wx\setup.h' failed
mingw32-make: *** [..\..\lib\gcc_dll\mswu\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from ..\..\include/wx/defs.h:20:0,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:136:22: fatal error: wx/setup.h: No such file or directory
#include "wx/setup.h"
^
compilation terminated.
Makefile.gcc:5778: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1
我可能错了,但在我看来这两行
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
说明有问题。
现在,我自己创建了目录并将 setup.h 复制进去。在我家它还没有在构建,但我不记得为什么,而现在,在办公室,它开始构建,但以这个结束:
......
g++ -c -o gcc_mswudll\wxscintilla_LexCOBOL.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LE
XER -DLINK_LEXERS -I..\..\lib\gcc_dll\mswu -I..\..\include -D__WXMSW__ -D_UNICODE -fno-keep-inline-dllexport -std=c++11 -MTgcc_mswudll\wxscintilla_LexCOBOL.o -MFgcc_mswudll\wxscintilla_LexCOBOL.
o.d -MD -MP ../../src/stc/scintilla/lexers/LexCOBOL.cxx
In file included from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from ../../src/stc/scintilla/lexers/LexBibTeX.cxx:18:
c:\sviluppo\tools\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\sviluppo\tools\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
{ return (float)(_hypot (x, y)); }
^
g++ -c -o gcc_mswudll\wxscintilla_LexCoffeeScript.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -
DSCI_LEXER -DLINK_LEXERS -I..\..\lib\gcc_dll\mswu -I..\..\include -D__WXMSW__ -D_UNICODE -fno-keep-inline-dllexport -std=c++11 -MTgcc_mswudll\wxscintilla_LexCoffeeScript.o -MFgcc_mswudll\wxscint
illa_LexCoffeeScript.o.d -MD -MP ../../src/stc/scintilla/lexers/LexCoffeeScript.cxx
Makefile.gcc:6183: recipe for target 'gcc_mswudll\wxscintilla_LexBibTeX.o' failed
mingw32-make: *** [gcc_mswudll\wxscintilla_LexBibTeX.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
C:\wxWidgets-3.1.0\build\msw>
所以,我们仍然没有构建 wxWidgets。
更新:
尝试按照答案中的建议进行调试构建。这是输出:
C:\wxWidgets-3.1.0\build\msw> mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=
1 BUILD=debug VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLIT
HIC=1
if not exist gcc_mswuddll mkdir gcc_mswuddll
if not exist ..\..\lib\gcc_dll\mswud mkdir ..\..\lib\gcc_dll\mswud
if not exist ..\..\lib\gcc_dll\mswud\wx\setup.h copy ..\..\include\wx\msw\setup.
h ..\..\lib\gcc_dll\mswud\wx\setup.h
gcc -c -o gcc_mswuddll\wxregex_regcomp.o -g -O0 -mthreads -DHAVE_W32API_H -DNDE
BUG -I..\..\include -I..\..\lib\gcc_dll\mswud -D__WXMSW__ -D_UNICODE -MTgcc_m
swuddll\wxregex_regcomp.o -MFgcc_mswuddll\wxregex_regcomp.o.d -MD -MP ../../src/
regex/regcomp.c
Impossibile trovare il percorso specificato.
0 file copiati.
Makefile.gcc:5728: recipe for target '..\..\lib\gcc_dll\mswud\wx\setup.h' failed
mingw32-make: *** [..\..\lib\gcc_dll\mswud\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from ..\..\include/wx/defs.h:20:0,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:136:22: fatal error: wx/setup.h: No such file or dir
ectory
compilation terminated.
Makefile.gcc:5778: recipe for target 'gcc_mswuddll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswuddll\wxregex_regcomp.o] Error 1
文件在那里,所以我不知道是什么问题......
C:\wxWidgets-3.1.0\build\msw>dir ..\..\src\regex\regcomp.*
Il volume nell'unità C è 1TBWD-1-WIN7 64
Numero di serie del volume: A26D-1E3B
Directory di C:\wxWidgets-3.1.0\src\regex
28/02/2016 22:33 59.702 regcomp.c
1 File 59.702 byte
0 Directory 74.986.561.536 byte disponibili
C:\wxWidgets-3.1.0\build\msw>