Results 1 to 5 of 5

Thread: LIBGL where to find....

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    Kanpur
    Posts
    14

    LIBGL where to find....

    Hello,

    I am using Minw32 GCC (Dev-CPP) to compile OpenGL programs. Somebody in the newsgroup said that -lgl option would be required to compile with OpenGL library....

    I need help regarding this... LibGL file for Windows .... where to get them
    Suddhasheel GHOSH
    Chercheur Geomatique

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: LIBGL where to find....

    On windows, it should be -lopengl32 instead of -lGL.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    Kanpur
    Posts
    14

    Re: LIBGL where to find....

    Help this the code and it is not working
    #include <windows.h>
    #include <GL\glut.h>

    void init()
    {
    glClearColor(1,0,0,1);
    glOrtho(0,1,0,1,0,1);
    }

    void display()
    {
    glClear(GL_COLOR_BUFFER_BIT);
    glFlush();
    }

    int main(int argc, char **argv)
    {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGB|GLUT_SINGLE);
    glutInitWindowSize(800,600);
    glutInitWindowPosition(5,20);
    glutCreateWindow("Tutorial 1");
    init();
    glutDisplayFunc(display);
    glutMainLoop();
    return 0;
    }

    The error messages given by the compiler are as follows:

    g++.exe "D:\shudh\ccodes\ogl_vertex_data\ogl_vertex_data\t est.cpp" -o "D:\shudh\ccodes\ogl_vertex_data\ogl_vertex_data\t est.exe" -I"C:\apps\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\apps\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\apps\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\apps\Dev-Cpp\include\c++\3.4.2" -I"C:\apps\Dev-Cpp\include" -L"C:\apps\Dev-Cpp\lib" -lglu32 -lopengl32 -lglut -mwindows
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0xb2):test.cpp: undefined reference to `glutInit'
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0xbe):test.cpp: undefined reference to `glutInitDisplayMode'
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0xd2):test.cpp: undefined reference to `glutInitWindowSize'
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0xe6):test.cpp: undefined reference to `glutInitWindowPosition'
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0xf2):test.cpp: undefined reference to `glutCreateWindow'
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0x103):test.cpp: undefined reference to `glutDisplayFunc'
    C:\DOCUME~1\SUDDHA~1\LOCALS~1\Temp/cce6aaaa.o(.text+0x10:test.cpp: undefined reference to `glutMainLoop'
    collect2: ld returned 1 exit status

    Execution terminated
    Suddhasheel GHOSH
    Chercheur Geomatique

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: LIBGL where to find....

    Hmm...

    Normally I'd say you have forgotten -lglut, but you haven't

    Make sure the glut library is installed on your system (glut.a + glut.dll), and make sure it is not broken... Also I'm not really sure, it's a long time since I last developed on windows, but could it be that this is called glut32, too?

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    Kanpur
    Posts
    14

    Re: LIBGL where to find....



    Glut32.dll exists in the system directory and the system32 directory as well.

    Now the new errors are there ... please see the compile log

    Compiler: Default compiler
    Executing g++.exe...
    g++.exe "D:\shudh\ccodes\ogl_vertex_data\ogl_vertex_data\t est.cpp" -o "D:\shudh\ccodes\ogl_vertex_data\ogl_vertex_data\t est.exe" -I"C:\apps\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\apps\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\apps\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\apps\Dev-Cpp\include\c++\3.4.2" -I"C:\apps\Dev-Cpp\include" -L"C:\apps\Dev-Cpp\lib" -lglu32 -lopengl32 -lglut -lglut32 -mwindows
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_event.o)(.text+0x319):glut_event. c: undefined reference to `glFinish@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_event.o)(.text+0x374):glut_event. c: undefined reference to `wglSwapBuffers@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_event.o)(.text+0x3dc):glut_event. c: undefined reference to `wglSwapBuffers@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x18f):glut_win.c: undefined reference to `wglGetCurrentContext@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x196):glut_win.c: undefined reference to `wglGetCurrentDC@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x1b6):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x1d5):glut_win.c: undefined reference to `glViewport@16'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x1f7):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x216):glut_win.c: undefined reference to `glViewport@16'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x21e):glut_win.c: undefined reference to `wglGetCurrentContext@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x225):glut_win.c: undefined reference to `wglGetCurrentDC@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x241):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x843):glut_win.c: undefined reference to `wglGetCurrentContext@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x84a):glut_win.c: undefined reference to `wglGetCurrentDC@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x866):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x897):glut_win.c: undefined reference to `glDrawBuffer@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0x8a6):glut_win.c: undefined reference to `glReadBuffer@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xaa1):glut_win.c: undefined reference to `wglDeleteContext@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xb61):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xbd2):glut_win.c: undefined reference to `wglGetCurrentContext@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xbd9):glut_win.c: undefined reference to `wglGetCurrentDC@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xbf5):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xcb4):glut_win.c: undefined reference to `wglGetCurrentContext@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xcbb):glut_win.c: undefined reference to `wglGetCurrentDC@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_win.o)(.text+0xcd7):glut_win.c: undefined reference to `wglMakeCurrent@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_mesa.o)(.text+0x80):glut_mesa.c: undefined reference to `glGetString@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_mesa.o)(.text+0x91):glut_mesa.c: undefined reference to `glGetString@4'

    C:\apps\Dev-Cpp\lib/libglut32.a(glut_util.o)(.text+0x281):glut_util.c: undefined reference to `glGetError@0'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_util.o)(.text+0x28d):glut_util.c: undefined reference to `gluErrorString@4'

    C:\apps\Dev-Cpp\lib/libglut32.a(win32_glx.o)(.text+0x30d):win32_glx.c: undefined reference to `wglCreateContext@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(glut_swap.o)(.text+0x71):glut_swap.c: undefined reference to `wglSwapBuffers@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(win32_winproc.o)(.text+0x292):win32_wi nproc.c: undefined reference to `joyReleaseCapture@4'
    C:\apps\Dev-Cpp\lib/libglut32.a(win32_winproc.o)(.text+0x3fc):win32_wi nproc.c: undefined reference to `joySetCapture@16'
    C:\apps\Dev-Cpp\lib/libglut32.a(win32_winproc.o)(.text+0x162f):win32_w inproc.c: undefined reference to `joyGetPosEx@8'
    C:\apps\Dev-Cpp\lib/libglut32.a(win32_winproc.o)(.text+0x171f):win32_w inproc.c: undefined reference to `joyGetPosEx@8'
    collect2: ld returned 1 exit status

    Execution terminated
    Suddhasheel GHOSH
    Chercheur Geomatique

Similar Threads

  1. Seg fault in Nvidia libGL file
    By prsman in forum OpenGL: Linux
    Replies: 10
    Last Post: 12-26-2017, 05:35 PM
  2. Problem with libGL.os
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-01-2002, 05:14 AM
  3. libGL error
    By in forum OpenGL: Linux
    Replies: 2
    Last Post: 02-23-2002, 03:19 PM
  4. PB Nvidia libGL.so
    By malrog98 in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 03-14-2001, 11:39 AM
  5. troubles with libGL.so.1
    By Mat in forum OpenGL: Linux
    Replies: 2
    Last Post: 02-11-2001, 01:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean