OpenGL, GCC, Borland, Linux and damned GLUT

Started by
13 comments, last by tweakguide 22 years, 8 months ago
Hello! I am running Windows 98SE and I have GCC for Win32 (DJGPP). I can compile things in GCC command line, no problem. The only thing I can not do is compile OpenGL sample programs. This is really discouraging. I downloaded Glut DLLs but that didn''t seem to help! It seems to error out because of the #include or ! I dont understand! In the DJGPP/include/gl/ folder, there no GL anything. I had to download GLUT DLLs. I got a glut.h and that is it. Oh, wait, I have glut32.dll that I put in windows/system/ and I got a glut.lib....which I have no idea where to put. So, with all of this. How do I get GCC to compile simple OpenGL code? Thank you very very much in advance! '''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';` Linux Redhat BETA, GCC, OpenGL Wanna be, right here! '''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`
Advertisement
Try MinGW32 (most commonly used through DevC++, it''s just another port of GCC). It should make using OpenGL a whole lot easier.

[Resist Windows XP''s Invasive Production Activation Technology!]
I use gcc only on linux (VC++ for windows) so correct me if I''m incorrect. You have to put the glut.h into your include\gl folder, put the glut32.dll in windows\system (which you did), and include glut.(lib/dll?) into the path as a library by using the -l directive on the command line. Try .lib in the -l first and see how it comes out, since .lib ususally tells you how to link to a dll.

If worse turns to worse you might have to use ld (is it on windows?) to link to glut.
Your problem is probably related to the fact that DJGPP is _not_ GCC for Win32...its GCC for DOS(32). So I doubt you''ll ever get those Glut DLL''s to work with DJGPP. If you want a version of GCC for Windows, you''ll have to go with either Mingw32 as pointed out above, or try Cygwin at http://sources.redhat.com/cygwin
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Hey all!

I have MingW32 now. Its working just like the GCC for DOS.
So, I am not going to complain. Here is the deal so far.

My CUBE.C code reads this way;

#define APP_NAME "OpenGL Tutor : Cube"
#include
#include

It does NOT compile at all when I use MingW32 until I add
glut.h (3.7 version) to the include directory.

After adding glut.h, this is the weird error I get. Grrr.

C:\code\cube>gcc cube2.c
In file included from cube2.c:17:
C:\GCC-29~1.2\BIN\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..
2msvc\include\glut.h:131: GL\gl.h: No such file or directory
C:\GCC-29~1.2\BIN\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..
2msvc\include\glut.h:132: GL\glu.h: No such file or directory


Do you see? Its complaining about gl.h and glu.h which I do
NOT have and have no idea where the heck to get them! What
is up with that? This is the only thing holding me back from
compiling OpenGL and helping to destroy DirectX. ;-) hehe.

Please help me! Thanks in advance! YOU ROCK!


'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`

Linux Redhat BETA, GCC, OpenGL

Wanna be, right here!

'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`
Why don''t you have the OpenGL headers? I have them in the "include\Gl" directory for DevC++. I almost never use DevC++, so I''m sure I didn''t put them there . Do you have "libglu32.a" and/or "libopengl32.a" in your "lib" directory? If not, something went horribly wrong when you installed DevC++ .

[Resist Windows XP''s Invasive Production Activation Technology!]
I forgot the stupid HTML code...ok,

The include files are these

#define APP_NAME "OpenGL Tutor : Cube"
#include (stdio.h)
#include (gl/glut.h)


Sorry! Darn.

'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`

Linux Redhat BETA, GCC, OpenGL

Wanna be, right here!

'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`
Null and Void,

Hey! Thanks for the reply.

I do have libglu32.a in the tree. Its there. libopengl32.a is there too.

Sooooo.....Why am I getting crap about gl.h and glu.h?? Is it just a bad example program? I need to get new opengl sample code. I have to get samples first because I dont have a clue right now how to start from scratch.

Is cube.c and cube2.c just screwed up to begin with????

'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`

Linux Redhat BETA, GCC, OpenGL

Wanna be, right here!

'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`
OK. Update here. Sorry.

Apparently the glut.h has a bunch of things that have to be configed. I cant cut and past the whole header but maybe
I can give you the URL? Or summarized it.

http://www.xmission.com/~nate/glut.html

This is the URL. Its a very new version of glut so its worth a look anyhow.

glut.h needs to be configed. I already told it where the gl.h and glu.h files are going to BE, I just dont have them now! My hands are tied here. :-(

You just have Glut, you don''t have OpenGL yet. It''s sort of like trying to run automatic transmission without a car, it can''t be done.

http://download.microsoft.com/download/win95upg/info/1/W95/EN-US/Opengl95.exe


Get this and extract it, it''ll provide everything you need.

This topic is closed to new replies.

Advertisement