Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


OpenGL, GCC, Borland, Linux and damned GLUT


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 August 2001 - 03:47 PM

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! '''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`'''';`

Sponsor:

#2 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 21 August 2001 - 04:39 PM

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!]

#3 gph-gw   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 August 2001 - 07:36 PM

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.

#4 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 25 August 2001 - 12:30 AM

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

#5 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 05:44 AM

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!

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

#6 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 25 August 2001 - 05:59 AM

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!]

#7 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 06:00 AM

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!

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

#8 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 06:07 AM

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!

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

#9 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 06:18 AM

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. :-(



#10 gph-gw   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 07:47 AM

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.

#11 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 08:13 AM

Ummmm.

Why was I thinking I had OpenGL? Doesnt that come with Windows?
I have related DLLs and such.

I am downloading the file right now like you said. Wish me
luck, I suppose.



#12 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 08:24 AM

Nope. That did not work on Borlands command line nor the
MingW32. I added the .h files and the .lib (Just to borland)
and the DLL files to windows/system

No luck. I get a lot of errors like this;


Error E2451 pendulum.c 232: Undefined symbol ''p3'' in function almostSolidCylin
r
Error E2451 pendulum.c 232: Undefined symbol ''p4'' in function almostSolidCylin
r
Warning W8065 pendulum.c 232: Call to function ''cos'' with no prototype in func
on almostSolidCylinder
Warning W8065 pendulum.c 233: Call to function ''sin'' with no prototype in func
on almostSolidCylinder
Error E2451 pendulum.c 238: Undefined symbol ''v1'' in function almostSolidCylin
r
Error E2451 pendulum.c 242: Undefined symbol ''v2'' in function almostSolidCylin
r
Error E2451 pendulum.c 246: Undefined symbol ''normal'' in function almostSolidC
inder
Warning W8065 pendulum.c 247: Call to function ''glNormal3fv'' with no prototype
n function almostSolidCylinder
Warning W8065 pendulum.c 250: Call to function ''glVertex3f'' with no prototype
function almostSolidCylinder
Warning W8065 pendulum.c 251: Call to function ''glVertex3f'' with no prototype
function almostSolidCylinder
Warning W8065 pendulum.c 252: Call to function ''glVertex3f'' with no prototype
function almostSolidCylinder
Warning W8065 pendulum.c 253: Call to function ''glVertex3f'' with no prototype
function almostSolidCylinder
Warning W8065 pendulum.c 255: Call to function ''glEnd'' with no prototype in fu
tion almostSolidCylinder
Warning W8057 pendulum.c 256: Parameter ''h'' is never used in function almostSo
dCylinder
Error E2451 pendulum.c 260: Undefined symbol ''GL_COLOR_BUFFER_BIT'' in function
isplay
Error E2228 pendulum.c 260: Too many error or warning messages in function dis
ay
*** 26 errors in Compile ***




#13 gph-gw   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 09:44 AM

Are you #include-ing the gl\gl.h and gl\glu.h in your c files, or are you just #include-ing glut.h? It looks like you have to #include math.h as well for sin and cos.

#14 tweakguide   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 10:55 AM

Well, that must be at least part of it but why, I dont know.
This is a sample program I got from another site. If its not
including all of the headers, how the hell did the original
authors compile it? Just weird to me but thanks!




#15 gph-gw   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 06:57 PM

Try this: go to Nehe''s web site and go to lesson 1 and download the glut or linux source code, and try to compile it.

Now I would write more but my spacebar is stuck. (Seriously!)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS