Plz anyone help to fix the linking errors:

Discussion in 'MFC' started by dathatreya, Apr 3, 2008.

  1. dathatreya

    dathatreya New Member

    Joined:
    Apr 1, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Hello all,

    I am trying to build a 3d application in MFC Appwizard.I have included the header files: #include <gl/gl.h>
    #include <gl/glu.h>

    when i'm trying to build it, it is linking errors:they are

    Plz anyone help to fix the linking errors:

    --------------------Configuration: image_create - Win32 Debug--------------------
    Compiling...
    Image.cpp
    Linking...
    Image.obj : error LNK2001: unresolved external symbol __imp__glEnd@0
    Image.obj : error LNK2001: unresolved external symbol __imp__glBegin@4
    Debug/image_create.exe : fatal error LNK1120: 2 unresolved externals
    Error executing link.exe.

    image_create.exe - 3 error(s), 0 warning(s)

    And also I have attached my file....
    plz anyone give idea to fix that errors..
     
  2. Jadav Rakesh C.

    Jadav Rakesh C. New Member

    Joined:
    Nov 15, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    VC++ Developer
    Location:
    Surat
    Hi dathatreya,

    I have many possible ways to solve your linking problems.

    1)
    copy "OpenGL32.lib" & "Glu32.lib" at following location

    "...\\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib" for Visual Studio 8.0

    OR

    "...\\Program Files\Microsoft Visual Studio\VC98\Lib" for Visual Studio 6.0

    2)
    copy "OpenGL32.lib" & "Glu32.lib" where your application exe exist and use
    Load Library using #pragma comment()

    #pragma comment(lib,"OpenGL32.lib")
    #pragma comment(lib,"Glu32.lib")

    Enjoy............. with 3D.............Best of Luck
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice