I'm learning to write OpenGL programs. So far, I've been using C, but I'm realizing as the programs get more involved, it might be nice to program in a more object oriented way, so I'm setting up a skeleton program in C++.
This program couldn't be any simpler. Except that I get this error:
No matching function for call to glutInit()
I've seen this error in other posts, and I've implemented the suggestions, but the error remains. What am I doing wrong? Thanks!
chess.h
#ifndef __chess1__chess1__
#define __chess1__chess1__
#include <iostream>
#include <GLUT/GLUT.h> //edited
#endif /* defined(__chess1__chess1__) */
chess.cpp
#include "chess.h"
using namespace std;
int main(int argc, char * argv[]) {
glutInit();
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(1000, 1000);
glutCreateWindow("Chess Program");
glutMainLoop();
exit(0);
}