Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: help!first GL program(compile error)

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    1

    help!first GL program(compile error)

    alright, i just started programming in OpenGL, so got the book and everything. I try to compile the program and it gives me this:

    c:\program files\microsoft visual studio\myprojects\opengl test\openglllltest\bob].cpp(73) : error C2601: 'DrawTorso' : local function definitions are illegal

    'DrawTorso' is the name of the function

    i run Visual C++ under XPpro so HELP, PLEASE! thank you

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Tp.HCM
    Posts
    5

    Re: help!first GL program(compile error)

    Send your source code for me, I will find error from your program.
    quangkid@hcm.fpt.vn
    Originally posted by rage7826:
    alright, i just started programming in OpenGL, so got the book and everything. I try to compile the program and it gives me this:

    c:\program files\microsoft visual studio\myprojects\opengl test\openglllltest\bob].cpp(73) : error C2601: 'DrawTorso' : local function definitions are illegal

    'DrawTorso' is the name of the function

    i run Visual C++ under XPpro so HELP, PLEASE! thank you

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

    Re: help!first GL program(compile error)

    I'm guessing that you are not only new to OpenGL, but also fairly new to C++. If you aren't new, that error would tell you that you are trying to create a function inside another function, which is not possible in C++.

    Double check that you have your brackets all in place correctly. It's possible that whatever function is before DrawTorso is missing an ending bracket.
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Intern Newbie
    Join Date
    Aug 2002
    Posts
    35

    Re: help!first GL program(compile error)

    Put down the compiler, and STEP AWAY before someone gets hurt!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •