0

Mesa(OpenGL)のインストール方法について、このチュートリアルを実行しました。すべてが説明どおりに機能します。しかし、完全に機能するビルドコマンドをメイクファイルに入れようとすると、そうではありません。

これは私のメイクファイルです:

all:
    gcc -lglut -IGL -IGLEW -IGLU main.c -o OpenGLExample

make と入力すると、次のようになります。

gcc -lglut -IGL -IGLEW -IGLU main.c -o OpenGLExample
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glClearColor'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glClear'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glColor3f'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glOrtho'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glBegin'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glVertex2f'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glVertex2f'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glVertex2f'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glVertex2f'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glEnd'
/tmp/ccKVrQAu.o:main.c:function renderFunction: error: undefined reference to 'glFlush'
collect2: ld returned 1 exit status
make: *** [all] Error 1

チュートリアルのように Mint の代わりに Ubuntu を使用しています。

私が間違っているのは何ですか?

4

1 に答える 1