Archived

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

hello_there

include problem

Recommended Posts

i have two files that include gl.h and those files are included in main but i get and error saying redefinition on variables. eg error C2086: ''int APIENTRY'' : redefinition it says that heaps of times how do you stop this from happening. it works in my other programe but not in this one.

Share this post


Link to post
Share on other sites
yeah i know but it's more like this. i don't have a main.h just a file that has the variable and function definitions.

main.c

#ifndef _MAIN_C
#define _MAIN_C

#include "file.h"
#include "file2.h"

#endif

-----------------

file.h

#ifndef _FILE_H
#define _FILE_H

#include <gl/gl.h>

#endif

-----------------

file2.h

#ifndef _FILE2_H
#define _FILE2_H

#include <gl/gl.h>

#endif

[edited by - hello_there on March 18, 2003 4:21:49 AM]

Share this post


Link to post
Share on other sites