Jump to content
  • Advertisement
Sign in to follow this  
jreh

quick solution

This topic is 4811 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 think the proper links have been made to the needed files. I can compile the examples are run them just fine. I again tried copying the example from chapter 2 word for word and file for file, and I get this error as well. ....Perhaps my gl.h include file is old? Actually it can't be, because the examples compile fine. I am using the WinMain from the book, "Beginning OpenGL Programming" and I will add it at the end here as well. To be specific to only difference is the class name that I use instead of what the book uses. I have killed too many hours comparing and trying to figure this out, I know what the errors mean but not why they are happening. Feels like I have just started programming, but I have been going it for years. I'm using ms visual c++ 6.0 -------------------------------------------------------------------------- NaturalResponse.cpp c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void' c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found Error executing cl.exe. NaturalResponse.obj - 3 error(s), 0 warning(s) /* WIN_specular_fog */ #define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC /* For compatibility with OpenGL v1.0 */ #define GL_LOGIC_OP GL_INDEX_LOGIC_OP #define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT /*************************************************************/ //Error happens here. /*************************************************************/ WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value); WINGDIAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref); WINGDIAPI GLboolean APIENTRY glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences); WINGDIAPI void APIENTRY glArrayElement (GLint i); WINGDIAPI void APIENTRY glBegin (GLenum mode); WINGDIAPI void APIENTRY glBindTexture (GLenum target, GLuint texture); WINGDIAPI void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); WINGDIAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); WINGDIAPI void APIENTRY glCallList (GLuint list); WINGDIAPI void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists); WINGDIAPI void APIENTRY glClear (GLbitfield mask); --------------------------------------------------------------------------------- #define WIN32_LEAN_AND_MEAN #define WIN32_EXTRA_LEAN #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include "NaturalResponse.h" bool exiting = false; long windowWidth = 800; long windowHeight = 600; long windowBits = 32; bool fullscreen = true; HDC hDC; NaturalResponse *g_glRender = NULL; void SetupPixelFormat(HDC hDC) { int pixelFormat; PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), // size 1, // version . . . . . } LRESULT CALLBACK MainWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { static HDC hDC; static HGLRC hRC; int height, width; // dispatch messages switch (uMsg) { case WM_CREATE: // window creation hDC = GetDC(hWnd); . . . . } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { WNDCLASSEX windowClass; // window class HWND hwnd; // window handle MSG msg; // message DWORD dwExstyle; // Window Extended style DWORD dwstyle; // Window style RECT windowRect; g_glRender = new NaturalResponse; . . . . }

Share this post


Link to post
Share on other sites
Advertisement

This topic is 4811 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.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!