How do you compile an OpenGL program on Ubuntu?

When I try to compile the first example to this page using:

cc -o abgr abgr.c -lglut -lGLU -lGL -lXmu -lXext -lX11 -lm 

I get an error message:

 /usr/bin/ld: cannot find -lXmu collect2: ld returned 1 exit status 

What is the " lXmu "? How do I compile it?

+6
c linux ubuntu opengl
source share
3 answers

you may need to install libxmu-dev

to try:

 sudo apt-get install libxmu-dev libxmu6 
+2
source share

Try installing libxmu-dev.

 sudo apt-get install libxmu-dev 
+4
source share

I suggest you study this . For me it’s better to start with some kind of video. Good luck with your training! baby Ha

+1
source share

All Articles