3

新しい設定を試しています。私は32ビットのWindows 8 Proラップトップを使用しています。MinGW-builds の GCC 4.8.1 をダウンロードしました。LLVM と CLang (トランクの SVN コピーから 3.4+) をコンパイルするために使用しました。どちらも私のPATHにあります。

MinGW/GCC 4.7.1 のコピーが付属している CodeLite 5.2 をダウンロードしました。純粋なコンソール チュートリアルのサンプルは動作しましたが、wxWidgets のサンプルは動作しません。( Quick Startです。) wxWidgets をダウンロードしてインストールしました。(常に良い最初のステップです。) MinGW-4.8.1 でビルドしました。エラー ノートを読み、WXWIN「C:\wxWidgets-2.9.5」とWXCFG「..\build\msw\gcc_mswud」に 2 つの環境変数 (最初はローカル、現在はシステム) を追加しました。(最初は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

ある時点で、コンパイラのステップでエラー メッセージが出力され、次のステップでそれが実際のパラメーターとして解釈されました。(stdout ではなく stderr でエラーを送信する必要がありましたか?)

アップデート

実際の作業に移った後、エラーが発生し、ダウンロードした 4.8.1 を使用する代わりに、CodeLite のダウンロードに付属の MinGW 4.7.1 を CodeLite がまだ使用していることに気付きました。おそらく、検索ディレクトリを 4.8.1 に変更したことで問題が発生したと思われます。全部消してやり直そうかな…。

4

2 に答える 2

3

Windows 用の wx-config.exe ツールは 2 つの環境変数を使用します: WXCFG と WXWIN wx-config.exe が wx-config ファイルを見つけられるように、それらを提供する必要があります。システム全体ではなく、IDE 内で設定することをお勧めします。

これを行うには、メイン メニューから、[設定] -> [環境変数] に移動します。

2 つのエントリを追加します。

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

また、codelite は 4.8.1 ではなく GCC4.7.1 を使用していると述べました。Windows で GCC を使用する場合、すべてのコンポーネントを同じ GCC バージョンでビルドする必要があることを知っておく必要があります。そのため、GCC4.7.1 でビルドされているため、私たち (codelite チーム) が提供する wxWidgets を使用しないようにしてください。そうしないと、奇妙なクラッシュが発生する可能性があります。

codelite に別の GCC を使用させるには、codelite 内から PATH を変更するだけです。

設定 -> 環境変数

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

エラン

于 2013-07-27T04:35:45.803 に答える