Results 1 to 3 of 3

Thread: Problems in opengl programming

  1. #1
    Junior Member Newbie
    Join Date
    May 2001
    Posts
    1

    Problems in opengl programming

    Hello everybody,
    I'm a beginner. I'm planning to use opengl for my research. I'm using Microsoft VC++6.0(OS:Win NT). I have some doubts.

    1. Do i have to do any special settings in VC++6.0 for using opengl?
    2. What type of application i.e. what type of file i have to open for writing the codes? When we click File->New, which type of flie and project i should select?
    3. I typed the sample program from this webpage http://www.dev-gallery.com/programmi...ok/b_index.htm
    when i compiled the program i got 3 errors.

    d:\vs\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
    d:\vs\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
    d:\vs\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found

    I tried some programs from other webpages as well. When i compile those programs - result is same 3 errors.

    please help me and tell me how to proceed.

    Thanks in advance

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Problems in opengl programming

    I haven't seen this question asked for awhile...


    You have to #include <windows.h> BEFORE you #include <gl/gl.h>. There are definitions in windows.h that are used in gl.h, WINGDIAPI being one of them.


    One more thing... you'll probably get linker errors next if you forget to do this. You must include the opengl32.lib library into your project. Go to project settings, the link tab, and then an edit box that is labeled object/library modules. Add opengl32.lib to that list, and glu32.lib as well if you intend to use glu functions. You should do that for both the Release and Debug configurations.


    [This message has been edited by Deiussum (edited 05-29-2001).]
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Dunblane, Scotland
    Posts
    333

    Re: Problems in opengl programming

    hehehe, that caught me out last week, got me stuck for about 10 minutes
    Reality is for idiots only the best over come it!

Similar Threads

  1. Problems with programming!!!
    By Poorvankara in forum OpenGL: Linux
    Replies: 2
    Last Post: 02-18-2009, 11:25 AM
  2. Is OpenGL Programming Same as VRML Programming
    By grungefreak1 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 09-30-2008, 03:07 PM
  3. Problems with examble from the book "Opengl game programming"
    By dotdkay in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-10-2003, 07:56 AM
  4. Kyro II programming problems
    By vokesalex in forum OpenGL: User Software
    Replies: 2
    Last Post: 02-18-2002, 02:47 PM
  5. Problems with Object-Oriented OpenGL programming
    By Kdawg2002 in forum OpenGL: Basic Coding
    Replies: 18
    Last Post: 12-20-2001, 04:32 PM

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