Jump to content
  • Advertisement
Sign in to follow this  
openglJunkie

OpenGL (Solved)Including GL Header Files Causes Errors

This topic is 3476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm just trying to make a simple camera class and trying to include a header file that I need so I can call some OpenGL functions, but I get a million errors for some ridiculous reason... I included other OpenGL header files in other header files and didn't get any errors so what the heck is going on...? This doesn't work...
#ifndef CAMERA_H
#define CAMERA_H

#include <gl/glu.h>

class CCamera
{


Here's the errors, but I doubt this will help because there's nothing wrong with the header files, it has to be because I shouldn't have included it there:
------ Build started: Project: glBasic, Configuration: Debug Win32 ------
Compiling...
CCamera.cpp
c:\oglsdk\include\gl\gl.h(1151) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1151) : error C2146: syntax error : missing ';' before identifier 'glAccum'
c:\oglsdk\include\gl\gl.h(1151) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1152) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
c:\oglsdk\include\gl\gl.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1152) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1153) : error C2146: syntax error : missing ';' before identifier 'GLboolean'
c:\oglsdk\include\gl\gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1153) : error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'
c:\oglsdk\include\gl\gl.h(1153) : error C2371: 'APIENTRY' : redefinition; different basic types
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1154) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1154) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1154) : error C2146: syntax error : missing ';' before identifier 'glArrayElement'
c:\oglsdk\include\gl\gl.h(1154) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1154) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1155) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1155) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1155) : error C2146: syntax error : missing ';' before identifier 'glBegin'
c:\oglsdk\include\gl\gl.h(1155) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1155) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1156) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1156) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1156) : error C2146: syntax error : missing ';' before identifier 'glBindTexture'
c:\oglsdk\include\gl\gl.h(1156) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1156) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1157) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1157) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1157) : error C2146: syntax error : missing ';' before identifier 'glBitmap'
c:\oglsdk\include\gl\gl.h(1157) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1157) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1158) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1158) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1158) : error C2146: syntax error : missing ';' before identifier 'glBlendFunc'
c:\oglsdk\include\gl\gl.h(1158) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1158) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1159) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1159) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1159) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1159) : error C2146: syntax error : missing ';' before identifier 'glCallList'
c:\oglsdk\include\gl\gl.h(1159) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1159) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1159) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1160) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1160) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1160) : error C2146: syntax error : missing ';' before identifier 'glCallLists'
c:\oglsdk\include\gl\gl.h(1160) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1160) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1161) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1161) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1161) : error C2146: syntax error : missing ';' before identifier 'glClear'
c:\oglsdk\include\gl\gl.h(1161) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1161) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1162) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1162) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1162) : error C2146: syntax error : missing ';' before identifier 'glClearAccum'
c:\oglsdk\include\gl\gl.h(1162) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1162) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1163) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1163) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1163) : error C2146: syntax error : missing ';' before identifier 'glClearColor'
c:\oglsdk\include\gl\gl.h(1163) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1163) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1164) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1164) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1164) : error C2146: syntax error : missing ';' before identifier 'glClearDepth'
c:\oglsdk\include\gl\gl.h(1164) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1164) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1165) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1165) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1165) : error C2146: syntax error : missing ';' before identifier 'glClearIndex'
c:\oglsdk\include\gl\gl.h(1165) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1165) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1166) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1166) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1166) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1166) : error C2146: syntax error : missing ';' before identifier 'glClearStencil'
c:\oglsdk\include\gl\gl.h(1166) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1166) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1166) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1167) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1167) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1167) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1167) : error C2146: syntax error : missing ';' before identifier 'glClipPlane'
c:\oglsdk\include\gl\gl.h(1167) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1167) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1167) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1168) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1168) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1168) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1168) : error C2146: syntax error : missing ';' before identifier 'glColor3b'
c:\oglsdk\include\gl\gl.h(1168) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1168) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1168) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1169) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1169) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1169) : error C2146: syntax error : missing ';' before identifier 'glColor3bv'
c:\oglsdk\include\gl\gl.h(1169) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1169) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1170) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1170) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1170) : error C2146: syntax error : missing ';' before identifier 'glColor3d'
c:\oglsdk\include\gl\gl.h(1170) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1170) : error C2086: 'int APIENTRY' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'APIENTRY'
c:\oglsdk\include\gl\gl.h(1170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1171) : error C2144: syntax error : 'void' should be preceded by ';'
c:\oglsdk\include\gl\gl.h(1171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\oglsdk\include\gl\gl.h(1171) : error C2086: 'int WINGDIAPI' : redefinition
        c:\oglsdk\include\gl\gl.h(1151) : see declaration of 'WINGDIAPI'
c:\oglsdk\include\gl\gl.h(1171) : error C2146: syntax error : missing ';' before identifier 'glColor3dv'
c:\oglsdk\include\gl\gl.h(1171) : error C2182: 'APIENTRY' : illegal use of type 'void'
c:\oglsdk\include\gl\gl.h(1171) : fatal error C1003: error count exceeds 100; stopping compilation
Build log was saved at "file://c:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\glBasic\Debug\BuildLog.htm"
glBasic - 143 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


[Edited by - openglJunkie on December 15, 2008 7:50:03 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!