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 2 of 2

Thread: Problem linking openGL dev libraries

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2018
    Posts
    1

    Smile Problem linking openGL dev libraries

    I'm having trouble getting libopengl32.a to link into my program.
    The compiler is finding the library and it's not a c linkage problem afaik.

    Here's the compiler output:

    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:42: undefined reference to `glCreateProgram@0'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:45: undefined reference to `glCreateShader@4'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:54: undefined reference to `glShaderSource@16'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:57: undefined reference to `glCompileShader@4'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:61: undefined reference to `glGetShaderiv@12'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:65: undefined reference to `glAttachShader@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:68: undefined reference to `glCreateShader@4'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:77: undefined reference to `glShaderSource@16'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:80: undefined reference to `glCompileShader@4'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:84: undefined reference to `glGetShaderiv@12'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:88: undefined reference to `glAttachShader@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:91: undefined reference to `glLinkProgram@4'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:95: undefined reference to `glGetProgramiv@12'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:99: undefined reference to `glGetAttribLocation@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:112: undefined reference to `glGenBuffers@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:113: undefined reference to `glBindBuffer@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:114: undefined reference to `glBufferData@16'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:117: undefined reference to `glGenBuffers@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:118: undefined reference to `glBindBuffer@8'
    d:/my_projects/cubic_mahjong/working/source/main/c++/opengl.cpp:119: undefined reference to `glBufferData@16'


    Thanks in advance for any help. Greatly appreciated.
    Clarrie.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,476
    Because you're running on Windows, you need to use an extension loader like GLEW to query and provide the OpenGL function pointers:



Posting Permissions

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