Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: GLUT and DJGPP

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    21

    GLUT and DJGPP

    Hihi, I am new to programming with GLUT, but I now need to develop a program based on GLUT, using DJGPP. I have downloaded the Mesa GLUT and have included the gl\glut.h in the main .cpp file. Here are the details:

    main source: test.cpp
    class: test_class.cpp, test_class.h

    after I have:
    gcc -c test.cpp
    and:
    gcc -c test_class.cpp

    then I type:
    gcc -o test.exe test.o test_class.o -lglut32 -lGLU32 -lOpenGL32

    then the compiler(ld.exe) complains that the file "-lglut32" was not found.

    I have tried something like: -lglut -lMesaGLU, etc...but the result is the same.

    I have copied the glut32.lib, GLU32.lib and OpenGL32.lib into the compiler's library directory already, how come it cannot be linked? Can someone help me????
    Thanks in advance!!!

  2. #2
    Member Contributor
    Join Date
    Feb 2001
    Location
    Slovakia
    Posts
    53

    Re: GLUT and DJGPP

    glut32.lib??? what's that? DJGPP library extensions are *.a . Try to copy libglut.a into DJGPP/LIB directory. But don't forget that Mesa GLUT implementation is not complete!

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    21

    Re: GLUT and DJGPP

    thx a lot Fredy!
    I have browsed the djgpp/lib directory and found some .a there
    but could you tell me how to get the .a lib for mesa/glut of djgpp?
    thanks!!!

  4. #4
    Member Contributor
    Join Date
    Feb 2001
    Location
    Slovakia
    Posts
    53

    Re: GLUT and DJGPP

    try: make -f makefile.dja or make -f makefile.dj depends on that if you use Allegro or not.
    Be sure that the make.exe is the "djgpp make.exe".

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    21

    Re: GLUT and DJGPP

    Thx again Fredy for your prompt reply!
    Could you tell me if I could get directly a pre-compiled .a library for djgpp? or, if I make it myself, how can I do it in dos? coz I have browsed the djgpp directory but could not find any make.exe, and I am using windows/dos. Moreover, is allegro a library supporting opengl? Really thx for your kind help!

  6. #6
    Member Contributor
    Join Date
    Feb 2001
    Location
    Slovakia
    Posts
    53

    Re: GLUT and DJGPP

    Allegro don't support OpenGL but Mesa implementation of OpenGL for DJGPP uses Allegro.
    You can get Allegro from http://www.talula.demon.co.uk/ and make.exe for DJGPP from: http://www.delorie.com/ but i send you a mail with precompiled gl, glu, glut libraries an make.exe too. (I don't know if these libraries work with a other version of gcc than 2.81).

  7. #7
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    21

    Re: GLUT and DJGPP

    Thx so much Fredy! I have copied the .a to the lib directory. Now the gcc can find the library, but it reports some errors:

    libgl.a(amesa.o)(.text...):amesa.c: undefined reference to .....

    is it bcoz my djgpp version problem?
    or should I add other -l options besides -lglu, -lgl -lglut ?
    Thanks again!

  8. #8
    Member Contributor
    Join Date
    Feb 2001
    Location
    Slovakia
    Posts
    53

    Re: GLUT and DJGPP

    1. Get Allegro 3.9.34 WIP!!! if you don't have it.
    2. order of libraries: -lglut -lglu -lgl -lalleg
    3. Be sure to rename the file lib/glut_h.dja to lib/glut.h
    And if it still not work then try to compile Mesa again with the djgpp make.exe but beware the makefile.dja isn't correct! (You should go to delorie site and get all required files for compiling with djgpp (use the Zip Picker)). If the compilation goes wrong then you shoud reply me later and i will try to help you. (And write the whole error message not only blah,blah...)

  9. #9
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    21

    Re: GLUT and DJGPP

    Many thanks! Fredy!
    I am trying what you suggest. I am getting more and more clear now. I hope it will work. Anyway, really have to thank you for your prompt and kind help! I will trouble you again if I still cannot get it work!! Thanks a lot!!!!!

  10. #10
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    21

    Re: GLUT and DJGPP

    Hi Fredy, sorry have to bother you again. I have successfully make the allegro, then I used it with the .a files (gl glu glut) u sent me previous and the following error occured:

    .../djgpp/lib/libglut.a(init.o)(.text+0x53:init.c: undefined reference to 'install_allegro'

    Then, I tried to make a new mesa-3.4.1 myself, and yes, the makefile.dja has errors:
    make.exe[1]: Entering directory .../mesa-3~1.1/src'
    Makefile.dja:117: depend.dja: No such file or direcory (ENOENT)
    make.exe[1]: *** No rule to make target 'depend.dja'. Stop.
    make.exe: *** [libs] Error2

    Then, I tried to go to the 117th line of the makefile.dja in the ./src directory and comment out the depend.dja, and got the following errors:

    make.exe[1]: Entering directory .../mesa-3~1.1/src'
    make.exe[1]: *** No rule to make target 'aatriangle.h', needed by 'aatriangle.o'. Stop.
    make.exe[1]: Leaving directory '.../mesa-3~1.1/src'
    make.exe: *** [libs] Error 2
    Could you suggest how to solve? THANKS AGAIN!!!

Page 1 of 2 12 LastLast

Similar Threads

  1. DJGPP ?
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-30-2002, 02:44 PM
  2. using opengl with djgpp
    By Luis in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-18-2002, 05:46 PM
  3. libraries for djgpp
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-22-2001, 08:26 PM
  4. using djgpp with GLUT
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-01-2001, 03:24 PM
  5. Is it possible to use OpenGL in DJGPP??
    By in forum OpenGL: User Software
    Replies: 0
    Last Post: 07-01-2000, 09:32 AM

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