How to static link GLUT? - Programmer

This is a discussion on How to static link GLUT? - Programmer ; I'm trying to use OpenGL, GLUT and GLUI, and I am unable to get a statically linked Release .exe. All my libraries are static linked. However during the final link, I get a bunch of errors. These errors are very ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to static link GLUT?

  1. How to static link GLUT?

    I'm trying to use OpenGL, GLUT and GLUI, and I am unable to get
    a statically linked Release .exe. All my libraries are static linked.
    However during the final link, I get a bunch of errors. These
    errors are very ironic because if I grep for any of these symbols
    they appear to be in the .obj's and .lib for GLUT.

    Can anyone explain what might be going wrong?

    When I do a Debug build, machines without VC++ Express installed
    refuse to run the program with an application configuration error.

    Thanks.

    Linking...
    program.obj : error LNK2001: unresolved external symbol
    __imp____glutCreateWindowWithExit@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp____glutCreateWindowWithExit@8
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutAddMenuEntry@8
    program.obj : error LNK2001: unresolved external symbol
    __imp____glutInitWithExit@12
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutInitWindowPosition@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutInitWindowPosition@8
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutMotionFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutMotionFunc@4
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutSwapBuffers@0
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutSwapBuffers@0
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutInitDisplayMode@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutInitDisplayMode@4
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutSetWindow@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutSetWindow@4
    glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    symbol __imp__glutSetWindow@4
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutSolidSphere@16
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutSetWindowTitle@4
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutAttachMenu@4
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutMainLoop@0
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutInitWindowSize@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutInitWindowSize@8
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutPostRedisplay@0
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutPostRedisplay@0
    glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    symbol __imp__glutPostRedisplay@0
    program.obj : error LNK2001: unresolved external symbol
    __imp__glutDisplayFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutDisplayFunc@4
    program.obj : error LNK2001: unresolved external symbol
    __imp____glutCreateMenuWithExit@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutCreateSubWindow@20
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutBitmapWidth@8
    glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    symbol __imp__glutBitmapWidth@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutBitmapCharacter@8
    glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    symbol __imp__glutBitmapCharacter@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutGetModifiers@0
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutSetCursor@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutGetWindow@0
    glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    symbol __imp__glutGetWindow@0
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutReshapeWindow@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutGet@4
    glui32.lib(glui_mouse_iaction.obj) : error LNK2001: unresolved
    external symbol __imp__glutGet@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutDestroyWindow@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutPositionWindow@8
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutShowWindow@0
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutHideWindow@0
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutSpecialFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutIdleFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutReshapeFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutKeyboardFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutMouseFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutVisibilityFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutEntryFunc@4
    glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    __imp__glutPassiveMotionFunc@4
    C:\Documents and Settings\User\Desktop\work\program\Release
    \program.exe : fatal error LNK1120: 36 unresolved externals


  2. Re: How to static link GLUT?


    "Flark" wrote in message
    news:88496a53-d97c-4506-869f-3cbe98426699@56g2000hsm.googlegroups.com...
    > I'm trying to use OpenGL, GLUT and GLUI, and I am unable to get
    > a statically linked Release .exe. All my libraries are static linked.
    > However during the final link, I get a bunch of errors. These
    > errors are very ironic because if I grep for any of these symbols
    > they appear to be in the .obj's and .lib for GLUT.
    >
    > Can anyone explain what might be going wrong?
    >
    > When I do a Debug build, machines without VC++ Express installed
    > refuse to run the program with an application configuration error.
    >
    > Thanks.
    >
    > Linking...
    > program.obj : error LNK2001: unresolved external symbol
    > __imp____glutCreateWindowWithExit@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp____glutCreateWindowWithExit@8
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutAddMenuEntry@8
    > program.obj : error LNK2001: unresolved external symbol
    > __imp____glutInitWithExit@12
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutInitWindowPosition@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutInitWindowPosition@8
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutMotionFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutMotionFunc@4
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutSwapBuffers@0
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutSwapBuffers@0
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutInitDisplayMode@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutInitDisplayMode@4
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutSetWindow@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutSetWindow@4
    > glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    > symbol __imp__glutSetWindow@4
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutSolidSphere@16
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutSetWindowTitle@4
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutAttachMenu@4
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutMainLoop@0
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutInitWindowSize@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutInitWindowSize@8
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutPostRedisplay@0
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutPostRedisplay@0
    > glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    > symbol __imp__glutPostRedisplay@0
    > program.obj : error LNK2001: unresolved external symbol
    > __imp__glutDisplayFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutDisplayFunc@4
    > program.obj : error LNK2001: unresolved external symbol
    > __imp____glutCreateMenuWithExit@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutCreateSubWindow@20
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutBitmapWidth@8
    > glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    > symbol __imp__glutBitmapWidth@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutBitmapCharacter@8
    > glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    > symbol __imp__glutBitmapCharacter@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutGetModifiers@0
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutSetCursor@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutGetWindow@0
    > glui32.lib(glui_control.obj) : error LNK2001: unresolved external
    > symbol __imp__glutGetWindow@0
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutReshapeWindow@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutGet@4
    > glui32.lib(glui_mouse_iaction.obj) : error LNK2001: unresolved
    > external symbol __imp__glutGet@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutDestroyWindow@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutPositionWindow@8
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutShowWindow@0
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutHideWindow@0
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutSpecialFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutIdleFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutReshapeFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutKeyboardFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutMouseFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutVisibilityFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutEntryFunc@4
    > glui32.lib(glui.obj) : error LNK2001: unresolved external symbol
    > __imp__glutPassiveMotionFunc@4
    > C:\Documents and Settings\User\Desktop\work\program\Release
    > \program.exe : fatal error LNK1120: 36 unresolved externals
    >


    This is off-topic for this news group, but anyway, you don't seem to be
    linking with a static glut library -- do you really have one ? (probably
    not).

    jbw



+ Reply to Thread