Note that there are some explanatory texts on larger screens.

plurals
  1. POmath_3d.h with opengl
    text
    copied!<p>So, I was reading <a href="http://ogldev.atspace.co.uk/www/tutorial02/tutorial02.html" rel="nofollow">http://ogldev.atspace.co.uk/www/tutorial02/tutorial02.html</a> and it said I needed math_3d.h for Vector3f.</p> <p>I tried to include it:</p> <pre><code>#include &lt;stdio.h&gt; #include "GL/glew.h" #include "GL/gl.h" #include "GL/freeglut.h" #include "math_3d.h" void render() { glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glutSwapBuffers(); glFlush(); } int main(int argc, char** argv) { glutInit(&amp;argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); glutInitWindowSize(800, 600); glutInitWindowPosition(100, 100); glutCreateWindow("OpenGL - First window demo"); /* Set */ GLenum res = glewInit(); if (res != GLEW_OK) { fprintf(stderr, "Error: '%s'\n", glewGetErrorString(res)); return 1; } Vector3f vertices[1]; glutDisplayFunc(render); glutMainLoop(); return 0; } </code></pre> <p>G++ said "main.cpp:7:21: fatal error: math_3d.h: No such file or directory". I looked for an Arch Linux package for it, but I found nothing.</p> <p>I found the file here:</p> <p><a href="http://ogldev.googlecode.com/svn-history/r75/trunk/tutorial36/math_3d.h" rel="nofollow">http://ogldev.googlecode.com/svn-history/r75/trunk/tutorial36/math_3d.h</a></p> <p>Am I supposed to download that file and place it my project directory, or is there a cleaner way of doing it?</p> <p>Also, if I do include it in my directory, how can I add it to the g++ line?</p> <pre><code>gcc main.cpp -o main -lGLEW -lglut -lGL </code></pre>
 

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