Archived

This topic is now archived and is closed to further replies.

OverGround

Precompiler directives {SIMPLE QUESTION}

Recommended Posts

I need to know what i am doing wrong. I have my OGLWindow class that includes gl.h Also I want to include my CBmpFont class into my main function but this class also include gl.h. Now the question is which precompiler directive do i call to eliminate the second call to #include <gl/gl.h> ? Im still here?

Share this post


Link to post
Share on other sites
GL.H has it''s own precompiler so that it is not included as many times as it is called.

open the file you should see something like
#ifndef SOMETHING_H
#define SOMETHING_H
//blah all kinds of stuff
#endif //SOMETHING_H

you could do this
#include <gl/gl.h>
#include <gl/gl.h>
#include <gl/gl.h>
#include <gl/gl.h>
#include <gl/gl.h>
#include <gl/gl.h>
#include <gl/gl.h>
and still not have a problem.

Share this post


Link to post
Share on other sites