Note that there are some explanatory texts on larger screens.

plurals
  1. POHaving many glut errors
    primarykey
    data
    text
    <p>I have found this code and wanted to try on my machine : </p> <pre><code>#include &lt;GL/freeglut.h&gt; static void RenderSceneCB() { glClear(GL_COLOR_BUFFER_BIT); glutSwapBuffers(); } static void InitializeGlutCallbacks() { glutDisplayFunc(RenderSceneCB); } int main(int argc, char** argv) { glutInit(&amp;argc, argv); glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA); glutInitWindowSize(1024, 768); glutInitWindowPosition(100, 100); glutCreateWindow("Tutorial 01"); InitializeGlutCallbacks(); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glutMainLoop(); return 0; } </code></pre> <p>And I got these errors : </p> <blockquote> <p>g++ tutorial01.cpp </p> <p>/tmp/ccOoXvqJ.o: In function `RenderSceneCB()':</p> <p>tutorial01.cpp:(.text+0xa): undefined reference to `glClear'</p> <p>tutorial01.cpp:(.text+0xf): undefined reference to `glutSwapBuffers'</p> <p>/tmp/ccOoXvqJ.o: In function `InitializeGlutCallbacks()':</p> <p>tutorial01.cpp:(.text+0x1f): undefined reference to `glutDisplayFunc'</p> <p>/tmp/ccOoXvqJ.o: In function `main': tutorial01.cpp:(.text+0x43):</p> <p>undefined reference to `glutInit' tutorial01.cpp:(.text+0x4d):</p> <p>undefined reference to `glutInitDisplayMode'</p> <p>tutorial01.cpp:(.text+0x5c): undefined reference to</p> <p>`glutInitWindowSize' tutorial01.cpp:(.text+0x6b): undefined reference</p> <p>to `glutInitWindowPosition' tutorial01.cpp:(.text+0x75): undefined</p> <p>reference to `glutCreateWindow' tutorial01.cpp:(.text+0x8b): undefined</p> <p>reference to `glClearColor' tutorial01.cpp:(.text+0x90): undefined</p> <p>reference to `glutMainLoop' collect2: ld returned 1 exit status</p> </blockquote> <p>I think I have successfully installed freeglut3-dev on my machine. Can you tell me why I'm getting so many errors? I'm using Ubuntu 12.04.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload