1

ちょっとばかげている気がしますが、新しい 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 をビルドする必要がありますが、Google で検索したページ (wxW wiki、codelite docs など) は、存在しないフォルダーとファイルを参照しています。すべてがデフォルトのフォルダーにインストールされます。私は 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

私は間違っているかもしれませんが、私にはこの2行のようです

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>
4

4 に答える 4

1

インストーラーは、TDM-GCC-64 セットアップをダウンロードしてインストールするように指示します。

CodeLiteが提案する...

私は今どうすればいい?

次のように wxWidgets をビルドします。

wxWidgets をビルドしたら、CodeLite で次の 2 つの環境変数を設定する必要があります: ( Settings->Environment variables ):

WXCFG=gcc_dll\mswu WXWIN=\path\to\wxWidgets

DebugCodeLite でプロジェクトの構成を構築しようとする場合は、次のいずれかを実行する必要があります。

wxWidgetsのバージョンをビルドしますdebug(これは CodeLite が検索するものです)

また

--debugコンパイラおよびリンカー オプションからフラグを削除します。

  1. Project Settings->Compiler->C++ Compiler Options を開き、--debug=yesまたは単に言う部分を削除します--debug
  2. Project Settings->Linker->Linker options で、--debug=yesまたは単に言う部分を削除します--debug

編集: CodeLite の wiki ページのリンクを更新

EDIT2:PATH回答に指示を追加

EDIT3: 環境変数 WXCFG および WXWIN の設定方法に関する説明を追加

エラン

于 2016-03-07T07:04:17.510 に答える