1. Resolving dependency Issues
Query the required software, and install it well in advance
If you use the command line installation, the default path is generally used, install with source code, then customize the installation path, you may need to configure the path later
PS: You may need to add related library files, header file paths in configuration files such as Makefile
2. Generate makefile
- Use Configure script: run./configure--help View optional configuration items, configure as needed, common options are--prefix, etc./configure build makefile
- Using tools such as Atuomake, temporarily unknown
- Using the CMake tool, you need to write CMakeLists.txt, see OPENCV application development
3. Compiling the installation
- Perform ' make ' to compile, perform ' make install ' to install, note check log
4. Related configurations
If not installed in/usr or/usr/local:
1) Make the related link libraries generated by the compilation shared by the system
sudo gedit/etc/ld.so.conf.d//install_dir/-V
2) Specify the program's header file location for the system (requires pkgconfig support, such as OPENCV)
sudo gedit/etc/bash.bashrcadd:PKG_CONFIG_PATH= $PKG _config_path:/install_dir/lib/pkgconfigexport PKG _config_pathrestart Terminal
3) In addition to the above two steps to let the compilation generated library files, header files can be called, but also in the writing of ordinary compilation commands using-l/install_dir/lib and-i/install_dir/include to specify, you can also rewrite the compilation command into the makefile
Linux source code compilation processing