OK, remind me how do I install GLUT again?

  • Follow


Specifically FreeGLUT.  The instructions do not match.

I wan to install glut.h into /usr/include/GL where all the other .h
files for OpenGL are.

Any clue?

0
Reply bushidohacks (69) 7/19/2005 11:27:19 PM

"Bushido Hacks" <bushidohacks@gmail.com> wrote in message
news:1121815639.687755.200460@o13g2000cwo.googlegroups.com...
> Specifically FreeGLUT.  The instructions do not match.
>
> I wan to install glut.h into /usr/include/GL where all the other .h
> files for OpenGL are.
>
> Any clue?
>

"rpm -ivh freeglut*.rpm" ?

jbw


0
Reply jbwest 7/20/2005 3:53:58 AM


In article <1121815639.687755.200460@o13g2000cwo.googlegroups.com>,
 "Bushido Hacks" <bushidohacks@gmail.com> wrote:

>Specifically FreeGLUT.  The instructions do not match.
>
>I wan to install glut.h into /usr/include/GL where all the other .h
>files for OpenGL are.

Don't you already have a package for your distro?
0
Reply Lawrence 7/20/2005 9:35:06 AM

Nevermind the installation part. I found it.  Turns out "whereis"
doesn't find everything. Turns out it glut.h was in
/usr/local/include/GL/glut.h and the correspoding libraries are in
/usr/local/lib.

Since compiling is the same (see commands below), What I need help with
is the linking part.  OpenGL programs from what I've been told need a
couple other command added to the linking process.

Compiling (for both regular C++ source codes and OpenGL source codes):
c++ -c file.cpp -o file.o

Linking (for regular C++ modules):
c++ -Wl--startgroup file.o -Wl--endgroup -o file.exe

Linking (for OpenGL modules):
c++ -Wl--startgroup file.o -Wl--endgroup ??? -o file.exe

What am I missing when I do the linking for OpenGL modules?

0
Reply Bushido 8/8/2005 12:50:38 PM

Nevermind, again.

I figured it out.

FC4 users might want to listen up:

c++ -Wl--startgroup ${1} -Wl--endgroup -I/usr/local/include/
-L/usr/local/lib/ -lglut -I/usr/X11R6/include/ -L/usr/X11R6/lib/ -lGL
-lGLU -lX11 -lXmu -lXi -lm -o ${2}

where ${1} is one or more object modules (.o files) and ${2} is the
name of the program.

I'm wondering if the "-I/usr/X11R6/include/ -L/usr/X11R6/lib/ -lGL
-lGLU -lX11 -lXmu -lXi -lm " part is neccessary.  I linked a program
with out it and it seemed to be working all right.

Is it neccessary or could I omit that to save resources and time?

0
Reply Bushido 8/9/2005 7:03:26 AM

Bushido Hacks wrote:

> I'm wondering if the "-I/usr/X11R6/include/ -L/usr/X11R6/lib/ -lGL
> -lGLU -lX11 -lXmu -lXi -lm " part is neccessary.  I linked a program
> with out it and it seemed to be working all right.
> 
> Is it neccessary or could I omit that to save resources and time?

Maybe you have an environment variable which holds all those paths and
libraries and adds them automatically to your gcc, but I haven't seen this
feature in neither of the distributions I used. In fact, forgetting to add
the math library '-lm' when using functions from <math.h> or <cmath> is one
of the more common mistakes of *nix begginers. It's also strange that GL
libraries are linked by default.

If you want your program to build fine on anyone else's computer, don't
remove those lines. Anyway, I'd doubt that the existence of those lines
could lead to an acceleration of the build proccess.
0
Reply Azdo 8/9/2005 8:08:32 AM

5 Replies
145 Views

(page loaded in 0.083 seconds)

Similiar Articles:








7/14/2012 9:30:45 AM


Reply: