0

私はこのチュートリアルに従っています: https://www.youtube.com/watch?v=mYnfix8ruAo で PDCurses をコンパイルして CodeBlocks プロジェクトにリンクしていますが、エラーが発生し続けます (「mingw32-make」は内部または外部コマンド、操作可能なプログラムまたはバッチ ファイル。)

問題は、私は間違いなく mingw を正しくインストールしており、システム環境変数でそれを指すパスを持っているということです。 http://puu.sh/id6nC/3ab670cbdc.png ターミナルで、ターゲット ファイルを指定せずにコマンドを 2 回実行して、認識されることを確認しました。なんらかの理由で、ライブラリをコマンドとして認識しなくなるのは、ライブラリをビルドしたいところまで来てからです。助けていただければ幸いです。

4

1 に答える 1

0

This isn't a PDCurses issue, it's a PATH issue. The PATH is an environment variable that the command-line shell uses to locate the executables you type as commands, if they aren't in the current directory, or shell built-ins. It's a list of directories, separated by semi-colons. Each directory is checked in turn, until a match is found.

Specifcally, your problem is this line:

path=c:\CodeBlocks\mingw\bin

Apparently, mingw32-make is not in that location. But, since it was found without that line, you clearly don't need the line -- at least not for that. So, just take it out.

Now, if it later turns out that you do need to add \CodeBlocks\mingw\bin to your PATH for some other reason, then the way to do it is like this:

path=%PATH%;c:\CodeBlocks\mingw\bin

This appends your new path to the existing PATH, instead of wiping out the existing PATH and replacing it with that directory alone.

于 2015-06-06T04:47:29.927 に答える