Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you compile an OpenGL program on Ubuntu?

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

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

I get an error message saying:

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

What is "lXmu"? How do I get this to compile?

like image 434
Steve Johnson Avatar asked Dec 25 '10 04:12

Steve Johnson


People also ask

How do I run OpenGL programs in Ubuntu?

So to install this library, perform the following steps: Head on to the GLAD web service. Set the language to C++ and choose the specification as OpenGL. In the API section, select gl version of at least 3.3, make sure the profile is set to Core, and that the Generate a loader option is ticked.


1 Answers

Try installing libxmu-dev.

sudo apt-get install libxmu-dev
like image 156
Jonathan Sternberg Avatar answered Sep 29 '22 12:09

Jonathan Sternberg