1

I need to build GLEW from source so I can use it with Mingw in Code::Blocks being Mingw doesn't like to use the one's they compile in VS. I'm using Cygwin and I download the source for GLEW here and unzip it. I then browse to the folder with Cygwin using cd. Then I run

make Makefile

It then gives me these errors.

config/config.guess: line 6: $'\r': command not found
config/config.guess: line 8: $'\r': command not found
config/config.guess: line 26: $'\r': command not found
config/config.guess: line 27: $'\r': command not found
config/config.guess: line 38: $'\r': command not found
config/config.guess: line 40: $'\r': command not found
config/config.guess: line 52: $'\r': command not found
config/config.guess: line 63: $'\r': command not found
config/config.guess: line 66: $'\r': command not found
config/config.guess: line 69: syntax error near unexpected token `$'in\r''
'onfig/config.guess: line 69: `  case $1 in
config/config.guess: line 6: $'\r': command not found
config/config.guess: line 8: $'\r': command not found
config/config.guess: line 26: $'\r': command not found
config/config.guess: line 27: $'\r': command not found
config/config.guess: line 38: $'\r': command not found
config/config.guess: line 40: $'\r': command not found
config/config.guess: line 52: $'\r': command not found
config/config.guess: line 63: $'\r': command not found
config/config.guess: line 66: $'\r': command not found
config/config.guess: line 69: syntax error near unexpected token `$'in\r''
'onfig/config.guess: line 69: `  case $1 in
Makefile:40: *** "Platform '' not supported".  Stop.

I've read around and I haven't been able to find much useful on solving this problem yet. If you know a better way I can get GLEW working with Mingw that would also answer my question.

On Windows XP Using Code::Blocks 10.05 Using Cygwin 1.7.16-1 Using GLEW 1.8.0

UPDATE

Those errors have been fixed using dos2unix on the config.guess file. However, when I run the Makefile now it says there is nothing to be done for it.

4

3 に答える 3

4

config.guess には DOS 行末 ("\r\n") があるように見えますが、make は Unix 行末 ("\n") を想定しています。config.guess で任意のツールを実行して、それを Unix の行末に変換するだけです。私の cygwin には、このトリックを実行する dos2unix というツールがあります。

于 2012-08-02T22:24:57.770 に答える
1

Windows でコードを作成してビルドするだけの場合は、このトピックを参照してください。 Windows でGLEW を使用して OpenGL 拡張機能を使用する

于 2012-08-02T22:29:37.053 に答える
0

これについての返信が遅れて申し訳ありませんが、変数SYSTEMを設定するとcygwinで機能します。

$ SYSTEM=cygwin make

于 2013-02-26T04:26:03.997 に答える