Before attempting to install the SGL on a Linux system, be sure that the gcc development tools and GLUT library are in place. Test a simple non-SGL program that uses GLUT to make sure it compiles and runs successfully.
As root, copy the
sgl.h
and
sgl.hpp
header files
into the /usr/include/GL
directory:
cp sgl.h sgl.hpp /usr/include/GL
Set the permissions of the header files appropriately:
chmod go+r /usr/include/GL/sgl.h /usr/include/GL/sgl.hpp
You can build an SGL program named my_prog.cpp
with the following command:
g++ -Wall -o my_prog my_prog.cpp -lglut -lGLU
Copyright ©2019 Richard L. Halterman | Version 0.9.5 | February 17, 2019 |