Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:38:04+00:00 2026-06-12T16:38:04+00:00

I just installed the OpenGL library (actually most of source done in my computer

  • 0

I just installed the OpenGL library (actually most of source done in my computer already) and I try to compile the first program.

For x86 was run perfectly, however, for x64 that I config and redirect glut32.lib from

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib

to

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64

error has occur as below, I don’t know to solve this problem. The error seem like I haven’t link the library correctly?

error LNK2019: unresolved external symbol __imp_glutSwapBuffers referenced in function "void __cdecl drawcube(void)" (?drawcube@@YAXXZ)
error LNK2019: unresolved external symbol __imp_glutMainLoop referenced in function main
error LNK2019: unresolved external symbol __imp_glutIdleFunc referenced in function main
error LNK2019: unresolved external symbol __imp_glutDisplayFunc referenced in function main

My testing code is like this

<!-- language: cpp -->
void drawcube(void)
{

    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 1.0, 1.0);
    glMatrixMode(GL_MODELVIEW);
    glRotatef(angle, 0.0, 1.0, 0.0);
    glBegin(GL_LINE_LOOP);
    glVertex3iv(a);
    glVertex3iv(b);
    glVertex3iv(c);
    glVertex3iv(d);
    glEnd();
    glFlush();
    glutSwapBuffers();
}

<!-- language: cpp -->
int main(int argc, char **argv)
{

    glutInit(&argc, argv);
    glutInitWindowSize(800, 600);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    glutCreateWindow("Test OpenGL");
    glutDisplayFunc(drawcube);
    glutIdleFunc(drawcube);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(-30.0, 30.0, -30.0, 30.0, -30.0, 30.0);
    glRotatef(30.0, 1.0, 0.0, 0.0);
    glMatrixMode(GL_MODELVIEW);
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glutMainLoop();

    return(0);
}

Answer from @datenwolf was useful.

I just change to use freegult without error for complied in x64.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:38:05+00:00Added an answer on June 12, 2026 at 4:38 pm

    I just installed the OpenGL library (actually most of source done in my computer already) and I try to complie the first program.

    Huh? You mean you installed a OpenGL capbable driver (i.e. downloaded the driver from the GPU maker’s website, instead of using the crippled drivers shipping with Windows)? OpenGL usually doesn’t come in form of a library. It’s a specification for which implementations, usually in the form of drivers exist. Also you don’t need a special “OpenGL SDK” as all compilers ship with everything required to compile OpenGL programs. Whatever you installed, you probably don’t need it and it like does more harm than good.

    error LNK2019: unresolved external symbol __imp_glutSwapBuffers referenced in function "void __cdecl drawcube(void)" (?drawcube@@YAXXZ)
    

    Well, that’s not OpenGL, that’s GLUT. And GLUT is not part of OpenGL. It’s a 3rd party framework library, meant for the creation of small and simple OpenGL demonstrations. That one you actually must install on your system separately. I recommend using FreeGLUT (or not using GLUT at all). And unlike OpenGL where on both 32 bit and 64 bit architectures the DLL is called opengl32.dll, you need architecture specific versions of GLUT for this to compile properly. The old GLUT is unmaintained, hence there’s no 64 bit version of it. Thus my recommendation of FreeGLUT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed it with apt-get on debian linux with apt-get install libqt4-opengl the
I just installed Rails, etc. on a Windows 7 machine. Created my first app,
Just installed MonoDevelop for Android 2.8.6.5 on Windows XP. When I try to run
I have a simple OpenGL program using SDL on Linux that just attempts to
i'm trying to get into opengl programming, but fail to compile my first very
Just installed a clean version of mongodb on Fedora 17 64-bit, but the Mongo
Just installed Python 2.7.3 on a Windows7 machine. How do I get .py files
Just installed Jenkins in Ubuntu 12.04 and I wanted to create a simple build
Just installed the SDK and ADK. while updating, it gives the following error: unexpected
Just installed and migrated a 2008 solution on Vista ultimate 64 and .net 4.0.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.