Thread: Linker Error from code from a tutorial on this site (OpenGL tutorial)

  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    1

    Linker Error from code from a tutorial on this site (OpenGL tutorial)

    Sample OpenGL Program for C and C++ - OpenGL Tutorials - Cprogramming.com

    The large block of code at the end of this tutorial seems to work fine with the exception that on line 31, the code includes a file not found on my system, after doing a bit of digging, it seems that that code is superfluous anyway so I commented it out. What resulted were quite a few linker errors stemming mainly from the DrawCube() DrawArm() and Render() functions.

    Is gl/glaux.h really necessary? and if so, why don't I have it when I have all the other header files?

  2. #2
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    A quick Google would tell you that glaux is obsolete and deprecated, and apart from that any linker error generated a file-not-found probably means that, shockingly, the file wasn't found. Thus you are either missing the header entirely or haven't pointed your compiler/linker to look into the right place. If the first, maybe you haven't installed something that supplies it (e.g. GLUT)? If the second, maybe you should look for glaux ANYWHERE on your computer and check that you're looking in those places with your compiler/linker?

    And if the header isn't found on your system, is declared obsolete, and the tutorial needs it? Probably not a good tutorial to learn from.

    Failing simple logic like that, you could just google glaux.h and download it, but I'd frown on that personally.

    Basically, your question could be answered in the first two/three links at the top of Google for "glaux.h missing" or even "glaux.h".

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    I bookmarked this a while ago in preparation for one day in the future when I decide to learn OpenGL.

    Modern OpenGL resources round up

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error I have in OpenGL tutorial on this site.
    By Nirdop in forum C++ Programming
    Replies: 4
    Last Post: 07-25-2006, 03:03 PM
  2. How effective is the tutorial on this site?
    By Raeliean in forum C++ Programming
    Replies: 5
    Last Post: 07-07-2005, 03:24 PM