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

Thread: Windows OpenGl problem(C++ Code::Blocks)

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

    Windows OpenGl problem(C++ Code::Blocks)

    I recently just found this forum, and i've been having a headache over this problem! i dont want to fill up this post, so ill link you guys to the problem which i posted on a different forum. Thank you SO MUCH if you can help!
    http://www.cplusplus.com/forum/windows/75097/

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421
    It looks like linker errors since the first line says
    obj\Debug\main.o

    You need to find out how to link with opengl32.a or whatever Code::Blocks calls it (opengl32.lib?)
    You also should link with all other libraries that you use, such as glu32.a (or glu32.lib).
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Junior Member Regular Contributor Kopelrativ's Avatar
    Join Date
    Apr 2011
    Posts
    212
    Notice that you are using legacy OpenGL. Are you sure you want to do that?

    I am using CodeBlocks for OpenGL and MinGW, and I use the following libraries. But I use glew as an extension loading library.
    lglew32
    lopengl32
    Ws2_32
    ole32
    comctl32
    gdi32
    comdlg32
    uuid

Posting Permissions

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