Ubuntu kylin install opengl and Pangolin

**

installation steps

**:
1. Install OpenGL, install command
the sudo APT-GET-Essential Build the install
the sudo APT-GET for libgl1 the install-dev-Mesa
the sudo APT-GET-Mesa-dev libglu1 the install
the sudo APT-dev-GET libglut the install
the sudo APT-GET install freeglut3-dev
after installing opengl can use the following code to test:

 #include <GL/glut.h>
							void init(void)
							{
									glClearColor(0.0, 0.0, 0.0, 0.0);
									glMatrixMode(GL_PROJECTION);
									glOrtho(-5, 5, -5, 5, 5, 15);
									glMatrixMode(GL_MODELVIEW);
									gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
									return;
							}
							 
							void display(void)
							{
									glClear(GL_COLOR_BUFFER_BIT);
									glColor3f(1.0, 0, 0);
									glutWireTeapot(3);
									glFlush();
									return;
							}
							 
							int main(int argc, char *argv[])
							{
									glutInit(&argc, argv);
									glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
									glutInitWindowPosition(0, 0);
									glutInitWindowSize(300, 300);
									glutCreateWindow("OpenGL 3D View");
									init();
									glutDisplayFunc(display);
									glutMainLoop();
									return 0;
							}

Upon completion of compiling and linking execution:
gcc -o OpenGL opengl.c -lGL -lGLU -lglut
$ / OpenGL.

Reference link: https: //blog.csdn.net/l297969586/article/details/53534807

**

2. Install Pangolin

**
安装命令
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake …
make
sudo make install

Reference links: HTTPS: //blog.csdn.net/renhaofan/article/details/80991810
3. encountered problems
make not complete, find the cause of the error glew not found
a solution
to reinstall libglew-dev, use the command
sudo apt-get libglew-dev install
sudo APT-GET install cmake
sudo install for libboost-APT-GET-dev for libboost for libboost the Thread-dev-filesystem-dev

After the completion of the re-use the following command to reinstall:
cmake:
the make
sudo install the make
successful installation
reference link: https: //blog.csdn.net/u012986684/article/details/52860849

Released three original articles · won praise 0 · Views 100

Guess you like

Origin blog.csdn.net/seaflyren/article/details/104104364