openGL error

I am getting an error in my code that I don't know how to track down.
I wanted to make sure I didn't have any little mistakes in my classes before I started actually writing my program. my error is in my draw file and I don't know what it means. every file will compile by themselves except this one.
If you do want to see the other files just let me know.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <glut.h>
#include "Monster.h"

#ifndef DRAW_MAIN
#define DRAW_MAIN

/************************
*function declarations  *
************************/
void DrawMNum(int M);

/************************
*functions		*
************************/

void DrawMonster() 
{	
	/********************
	*temp variable	    *
	*move to config file*
	********************/
	int const MMax = 30; 


	glClear(GL_COLOR_BUFFER_BIT);
	glColor3f(1.0, 1.0, 1.0);
	glBegin(GL_TRIANGLES);

	//draw each monster.
	for (int i = 0; i < MMax; i++)
	{
		DrawMNum(i);
	}

	glEnd();
	glFlush();
}


void DrawMNum(int M) //draws one monster
{
		glVertex3f(0, 0, 0);
		glVertex3f(1, 0, 0);
		glVertex3f(0, 1, 0);
}

#endif 


1>------ Build started: Project: monsters, Configuration: Debug Win32 ------
1> draw.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdlib.h(353): error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\glut.h(146) : see declaration of 'exit'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Last edited on
Topic archived. No new replies allowed.