Results 1 to 10 of 10

Thread: Another newbie needs alot of help to get started

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    6

    Another newbie needs alot of help to get started

    I know that questions like this have been asked hundreds of times, but I've exhausted all of my local resources, and I still need major help. If the question is too basic for this place, can you please direct me to some other source?

    I can't seem to get OpenGL to work on my system. I'm running Windows 98 with the DJGPP compiler. I put gl.h and glu.h in c:\djgpp\include\gl. OpenGl32.lib and glu32.lib are in c:\djgpp\lib. My windows\system directory already had glu32.dll and opengl32.dll. Then downloaded precompiled glut files from http://reality.sgi.com/mjk_asd/glut3/#1 , and put glut32.dll in windows\system, glut.h in djgpp\include\gl, and glut32.lib in djgpp\lib.

    I got some sample code and then used

    gcc code.c -o code.exe -lglut32 -lglu32 -lopengl32 -lm

    On every line in gl.h between lines 1135 and 1470 I get syntax error before 'void' and "warning: data has no definition or storage class," and in glu.h I get parse errors with the same warning.

    The sample code includes <GL\glut.h>. Do I need windows.h as well?


    Thanks,
    Mark

  2. #2
    Guest

    Re: Another newbie needs alot of help to get started

    yes!! you need to include:

    #include <windows.h>
    #include <gl/glut.h>

    and always in that order!! windows before glut. Also do not forget to link the glut32.lib to you program. I hope this solves you problem. Check the readme on you compiler on how to link the lib file.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    6

    Re: Another newbie needs alot of help to get started

    Thanks for the reply.

    I do not have windows.h in my computer, and after scouring the net I still can't find it. I'm guessing it comes with some Windows SDK that one can download from Microsoft. Can you direct me to the place where I can get it?

    Also, will the file go in my compiler's lib directory (c:\djgpp\lib)? I noticed that all of the files in there have an .a extension. Does DJGPP even support .lib? If not, how do I convert opengl32.lib, glut32.lib, and glu32.lib into .a files?

    Mark

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    6

    Re: Another newbie needs alot of help to get started

    Well I found Windows.h and dropped it in the include directory. I added the #include <Windows.h> before the other #include statements, and compiled with gcc code.c -o code.exe -lglut32 -lglu32 -lopengl32. Now, in addition to all the previous errors, I get a couple hundred in the windows.h file.


    You stated that I should link the glut32.lib to my program. I'm not very familiar with the syntax, but I thought that the -lglut32 on the command line accomplished that.


    Maybe the problem is those .lib files.

  5. #5
    Guest

    Re: Another newbie needs alot of help to get started

    I am sorry, I am not familiar with your compiler, I now know that your compiler does not come with the win32 library, you cannot just drop windows.h in the include driectory and expect that to work, it comes with many other components. If you would open whindows.h you could see that you need many other header files and maybe many other .lib files. My suggestion to you is that you get Borland c++ or visual c++, that comes with all the necessary libraries and headers.

    Newbie

  6. #6
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    san bernardino, ca usa
    Posts
    14

    Re: Another newbie needs alot of help to get started

    opengl and djgpp! You are definately trying for something divine. Most of the work for DJGPP was just to move a linux 32 bit compiler over to windows pre-32. It can be found at http://www.delores.com. DJGPP is a good C++ compiler (I liked it quite a bit), but (and this is just memory here) I don't think it has any real windowing capabilities and relys more on it's linux roots than it's windows library compliance. Otherwise you might want to lie, cheat and steal a copy of Visual C++ or Codewarrior.

  7. #7
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    6

    Re: Another newbie needs alot of help to get started

    Thanks for the replies.

    I just went to DJPP because it was free, and I had used it a couple of years ago for some non-graphics programming.

    Anyway, if I download the free Borland compiler, will there be any issues that I should be warned about? Or can I just create the include\GL directory and place the glut files in the right place?

    Or should I just drop the hundred and get visual c++? I don't mind using command-line compilers at all, but I just want to start opengl programming as soon as possible.

    Mark

  8. #8
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    san bernardino, ca usa
    Posts
    14

    Re: Another newbie needs alot of help to get started

    That's funny. I was just gonna suggest you try the downloadable borland compiler. I downloaded it last year but I never got around to playing with it. Let me know if it works.

    Kelly

  9. #9
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    6

    Re: Another newbie needs alot of help to get started

    Wow. I download the Borland compiler, and after half an hour I compiled my first opengl program error-free. After messing with DJGPP for 3 days, I can finally move on to bigger and better things!

    There was one small problem, though. The precompiled glut32.lib from SGI apperently only works with Microsoft compilers. I got a precompiled Borland version here:
    http://home.clara.net/paulyg/ogl.htm#Borland

    Mark

  10. #10
    Junior Member Newbie
    Join Date
    May 2001
    Location
    Toronto, ON, Canada
    Posts
    28

    Re: Another newbie needs alot of help to get started

    The reason DJGPP didn't work was because it is a DOS compiler, it won't produce a Win32 executable. As for the free borland compiler, its pretty good, just don't use their DirectX libs, they were painfully screwed last time I used them.

Similar Threads

  1. help a newbie get started
    By gastr in forum OpenGL ES
    Replies: 1
    Last Post: 12-16-2004, 04:10 AM
  2. Hey need some major help have alot of problems
    By JerseyDevil in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-27-2004, 07:59 PM
  3. Super Newbie: getting started
    By J-Tek in forum OpenGL: Linux
    Replies: 4
    Last Post: 03-25-2002, 04:56 AM
  4. Why are alot of game companies only using d3d??
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-24-2001, 07:11 PM
  5. Found alot of .plans
    By thefaro in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 08-15-2000, 10:25 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