Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Cannot open "glut.h"...

Cannot open "glut.h"...

Scheduled Pinned Locked Moved C / C++ / MFC
csharpquestionvisual-studiographicsgame-dev
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Polite Programmer
    wrote on last edited by
    #1

    Hello All! Its my first message on the forum though I am a member of CodeProject for quite a while... I am currently trying to learn OpenGL on Win32 Platforms to simplfy the task, I downloaded GLUT32 Toolkit and did the following 1) Pasted the GLUT.h in Include/gl directory (gl.h, and glu.h already there...) 2) Pasted the GLUT32.lib in Lib Directory 3) Pasted GLUT32.dll in System32 Directory Now

    #include <gl/glut.h>

    give error

    c:\Documents and Settings\Mohsin Hijazee\My Documents\Visual Studio Projects\OpenGL Test\stdafx.h(21): fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory

    I am unable to understand why is it so... Please guide me what is that I am doing wrong? Best regards, Mohsin Polite Programmer


    More Object Oriented then C#

    _ C 2 Replies Last reply
    0
    • P Polite Programmer

      Hello All! Its my first message on the forum though I am a member of CodeProject for quite a while... I am currently trying to learn OpenGL on Win32 Platforms to simplfy the task, I downloaded GLUT32 Toolkit and did the following 1) Pasted the GLUT.h in Include/gl directory (gl.h, and glu.h already there...) 2) Pasted the GLUT32.lib in Lib Directory 3) Pasted GLUT32.dll in System32 Directory Now

      #include <gl/glut.h>

      give error

      c:\Documents and Settings\Mohsin Hijazee\My Documents\Visual Studio Projects\OpenGL Test\stdafx.h(21): fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory

      I am unable to understand why is it so... Please guide me what is that I am doing wrong? Best regards, Mohsin Polite Programmer


      More Object Oriented then C#

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Go to project>settings and in the object library module box add the following to link to OpenGL Libraries Opengl32.lib glaux.lib glu32.lib Now compile Does this solve your problem Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar

      C 1 Reply Last reply
      0
      • P Polite Programmer

        Hello All! Its my first message on the forum though I am a member of CodeProject for quite a while... I am currently trying to learn OpenGL on Win32 Platforms to simplfy the task, I downloaded GLUT32 Toolkit and did the following 1) Pasted the GLUT.h in Include/gl directory (gl.h, and glu.h already there...) 2) Pasted the GLUT32.lib in Lib Directory 3) Pasted GLUT32.dll in System32 Directory Now

        #include <gl/glut.h>

        give error

        c:\Documents and Settings\Mohsin Hijazee\My Documents\Visual Studio Projects\OpenGL Test\stdafx.h(21): fatal error C1083: Cannot open include file: 'gl/glut.h': No such file or directory

        I am unable to understand why is it so... Please guide me what is that I am doing wrong? Best regards, Mohsin Polite Programmer


        More Object Oriented then C#

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        Make sure that in your project settings you have added the path to the include folder of openGL in the "Additional Include Directories" option. This option can be found in the C/C++ tab -> General.

        R 1 Reply Last reply
        0
        • _ _AnsHUMAN_

          Go to project>settings and in the object library module box add the following to link to OpenGL Libraries Opengl32.lib glaux.lib glu32.lib Now compile Does this solve your problem Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          It's not a link error but a compile error. So, the first thing to check is the include directories, not the library directories. But anyway, this problem will probably occur later if didn't add the library directory to his project ;).

          1 Reply Last reply
          0
          • C Cedric Moonen

            Make sure that in your project settings you have added the path to the include folder of openGL in the "Additional Include Directories" option. This option can be found in the C/C++ tab -> General.

            R Offline
            R Offline
            Rick York
            wrote on last edited by
            #5

            Typically OpenGL files are placed in the GL subdirectory under the main VC++ include directory which is why the include statements say GL/glut.h. I think he should make sure that glut.h is in with the other OpenGL headers.

            P 1 Reply Last reply
            0
            • R Rick York

              Typically OpenGL files are placed in the GL subdirectory under the main VC++ include directory which is why the include statements say GL/glut.h. I think he should make sure that glut.h is in with the other OpenGL headers.

              P Offline
              P Offline
              Polite Programmer
              wrote on last edited by
              #6

              As you all guyes sugested, Its not a linking problem, but compliation problem. I have mentioned all the libs like GL32.lib etc.... Amazing fact is that I am including two files from include/gl directory and those are gl.h and glu.h but no error at all! I put GLUT.h in the same directory, and following statment prodcues error

              #include <gl/glut.h>

              Strange... Any clue now? Polite Programmer


              More Object Oriented then C#

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups