Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Errors during compiling opengl , c++ code

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    13

    Errors during compiling opengl , c++ code

    Error 1 error LNK2019: unresolved external symbol __imp__glutInitContextProfile@4 referenced in function "void __cdecl InitWindow(int,char * * const)" (?InitWindow@@YAXHQAPAD@Z)


    Error 2 error LNK2019: unresolved external symbol __imp__glutInitContextFlags@4 referenced in function "void __cdecl InitWindow(int,char * * const)" (?InitWindow@@YAXHQAPAD@Z)


    Error 3 error LNK2019: unresolved external symbol __imp__glutInitContextVersion@8 referenced in function "void __cdecl InitWindow(int,char * * const)" (?InitWindow@@YAXHQAPAD@Z)


    Error 4 error LNK1120: 3 unresolved externals

    I can't understand the problem, please help.
    Thanks

  2. #2
    Intern Contributor
    Join Date
    Jun 2009
    Posts
    85
    Quote Originally Posted by animaks View Post
    Error 1 error LNK2019: unresolved external symbol __imp__glutInitContextProfile@4 referenced in function "void __cdecl InitWindow(int,char * * const)" (?InitWindow@@YAXHQAPAD@Z)


    Error 2 error LNK2019: unresolved external symbol __imp__glutInitContextFlags@4 referenced in function "void __cdecl InitWindow(int,char * * const)" (?InitWindow@@YAXHQAPAD@Z)


    Error 3 error LNK2019: unresolved external symbol __imp__glutInitContextVersion@8 referenced in function "void __cdecl InitWindow(int,char * * const)" (?InitWindow@@YAXHQAPAD@Z)


    Error 4 error LNK1120: 3 unresolved externals

    I can't understand the problem, please help.
    Thanks

    I guess, you haven't linked glut library while building your program.

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    13
    No, I did: Linker>Input...

  4. #4

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    13
    Here wasn't the declaration of my problem

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    It's definitely a linker error. Are you absolutely sure you have added freeglut.lib? BTW, kudos on opening yet another thread ...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •