I am trying to compile a .c file containing c-code for opengl. But I keep getting the following error: Interesting question. undefined reference to 'glClear' undefined reference to 'gluLookAt' undefined reference to 'glLoadIdentity' undefined reference to 'glColor3f' undefined reference to 'glLineWidth' undefined reference to 'glBegin' undefined reference to 'glVertex3d' undefined reference to 'glEnd' etc...
I am pretty sure there is nothing wrong with my source code as it is example code that has been provided to us.
the headers i included:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
How could I fix this issue?
FYI: I am compiling this on ubuntu