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,753

    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
    Member Newbie
    Join Date
    Aug 2002
    Posts
    42

    Re: help!first GL program(compile error)

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

Similar Threads

  1. Trying to compile an old program with glaux for Linux?
    By unlutt in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-07-2018, 12:25 PM
  2. Shader Compile Error: ERROR: 0:1: '' : syntax error #version
    By Blakeasd in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 07-25-2013, 07:35 PM
  3. I am trying to compile an example openGL program
    By opolat in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-19-2003, 03:30 PM
  4. How to compile OpenGL program on Linux?
    By in forum OpenGL: Linux
    Replies: 2
    Last Post: 07-13-2002, 08:19 PM
  5. Missing lib for program using glut to compile
    By VenTure in forum OpenGL: Linux
    Replies: 4
    Last Post: 02-13-2001, 10:15 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