glut in MS Visual Studio 2010 (MSVS10)



One of my earlier blogs, OpenGL and glut in C++ with MS Visual Studio 2008 (MSVS9) described how to set up your Visual Studio and Computer to work with glut, as well as OpenGL. Now with the new edition, Microsoft Visual Studio 2010, as the version shifted from v6.0A to v7.0A, we need to change some path.So, here goes, what we need to do for using glut in MSVS10:

  • Download the original GLUT library from Nate Robins’ site
  • Unzip the download and copy files as instructed below,
    • glut.h to the folder C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\gl\
    • glut32.lib to the folder C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\
    • glut32.dll to the folder C:\Windows\System32\
  • You are now ready to use GLUT!

All other things remain same as described on http://wp.me/puVgg-j

happy gluting, nJoy!

Advertisements

14 thoughts on “glut in MS Visual Studio 2010 (MSVS10)

  1. Thank you so much for this info! I’m a Computer Science student, and my professor uses an older version of VS in class, and I couldn’t figure out where to put the files 🙂

    Like

  2. thanks to write a really “workable” blog for using glut on the VS series..
    It save me lots of time.
    Thanks 😛
    (Hopes someday I can write this kind of good blogs like yours.)

    Like

    1. It is nice that my quick-notes are helpful to you, and I’m proud that u put links to by blog there in your site 🙂
      your blog is nice and neat and I really found that to be a good place for visiting frequently.

      Like

  3. hello I was luck to look for your Topics in baidu
    your topic is wonderful
    I obtain a lot in your blog really thanks very much
    btw the theme of you blog is really splendid
    where can find it

    Like

  4. I just installed vs2010, by this method, the folder include should have the folder GL by default right? but i don’t have it. where can i find the other library that is suppose to be there?

    Like

  5. I have done all of the instructions, but I still get error when write a sample code here:

    #include “stdafx.h”
    #include

    void display()
    {
    glClear(GL_COLOR_BUFFER_BIT);
    glBegin(GL_TRIANGLES);

    glClearColor(1.0,1.0,1.0,1.0);
    glColor3f(1.0,0.0,0.0);
    glVertex3f(-2.0,-2.0,0.0);
    glClearColor(1.0,1.0,1.0,1.0);
    glColor3f(0.0,1.0,0.0);
    glVertex3f(0.0,2.0,0.0);
    glClearColor(1.0,1.0,1.0,1.0);
    glColor3f(0.0,0.0,1.0);
    glVertex3f(2.0,-2.0,0.0);

    glEnd();
    glFlush();
    }
    void myinit()
    {
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluOrtho2D(-2.0,2.0,-2.0,2.0);
    glMatrixMode(GL_MODELVIEW);
    glClearColor(1.0,1.0,1.0,1.0);
    glColor3f(0.0,0.0,0.0);
    }

    int main(int argc, char* argv[])
    {
    if (argv[1] != NULL)
    { n=atoi(argv[1]);
    }
    else n=5;
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
    glutInitWindowSize(500,500);
    glutInitWindowPosition(100,100);
    glutCreateWindow(“Segitiga Warna”);
    glutDisplayFunc(display);
    myinit();
    glutMainLoop();

    return 0;
    }

    please, help me….

    Like

  6. I had a problem with my Windows 7 64 bit system. As soon as I wanted to start debugging, I got the following error message: […] could not find glut32.dll […]

    It was necassary to copy the glut32.dll into C:\Windows\SysWOW64. After this it worked without a problem.

    Maybe this information was helpful.
    Gerry

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s