Results 1 to 7 of 7

Thread: SuperBible program won't run

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    4

    SuperBible program won't run

    Hi everyone

    I am new to OpenGL and I am having trouble getting a program from the OpenGL SuperBible to run.

    I have MSVC++ and Glut 3.7. The Glut32.dll is in my Windows/System32 dir. The Glut.h is in my VC98 include dir and the Glut32.lib is in my VC98 lib dir

    Here is the code and the error
    #include <windows.h>
    #include <gl\glut.h>

    void RenderScene(void)
    {
    glClear(GL_COLOR_BUFFER_BIT);
    glFlush();
    }
    void SetupRC(void)
    {
    glClearColor(0.0f,0.0f,1.0f,1.0f);
    }

    void main(void)
    {
    glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
    glutCreateWindow("Simple");
    glutDisplayFunc(RenderScene);

    SetupRC();

    glutMainLoop();
    }
    unexpected end of file while looking for precompiled header directive

    I am sure I have everything linked right.I have the glut32.lib added to my link list and have instructed the compilier to use the VC98 lib and include dir's.

    Any help to resolve this problem would be greatly appreciated!

    Thanks for the patience
    Don

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

    Re: SuperBible program won't run

    Menu Project\Settings...
    Tab C/C++
    Category Precompiled Headers
    Choose "Not using precompiled headers"

  3. #3
    Member Contributor
    Join Date
    Jul 2003
    Location
    Rhode Island
    Posts
    55

    Re: SuperBible program won't run

    I'm not a C++ expert, but where this it:
    glutMainLoop();
    }
    shouldn't it be like this

    glutMainLoop();
    {
    }

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: SuperBible program won't run

    No there is no error in his usage of glutMainLoop.
    It is a routine from the glut library and is placed at the end of the main routine.


    Originally posted by zix99:
    I'm not a C++ expert, but where this it:
    shouldn't it be like this

    glutMainLoop();
    {
    }

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    4

    Re: SuperBible program won't run

    Thanks to everyone for your help

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    4

    Re: SuperBible program won't run

    It works, but now I get this error when the program runs
    "The procedure entry point glutCreateWindowWithExit could not be located in the dynamic link library glut32.dll"

    Thanks for the help

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    4

    Re: SuperBible program won't run

    I guess I should read previous posts before posting a new post? Sorry for that tongue twister.

    The code now runs,now that I have the new glut32.dll etc.

    thanks again

Similar Threads

  1. OpenGL SuperBible 5E, Triangle program background "scattered"
    By kyle.brechin in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-05-2014, 02:21 AM
  2. Help with the 1st program in SuperBible 5th edition for a linux user
    By imported_nerdinator in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-21-2012, 12:46 PM
  3. SuperBible 5th Edition First Program Problem
    By Artur Vieira in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-21-2011, 09:04 PM
  4. SuperBible 5th First program problems with Linux
    By pondwater in forum OpenGL: Linux
    Replies: 7
    Last Post: 11-08-2010, 10:10 AM
  5. Replies: 4
    Last Post: 07-11-2000, 07:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean