Eclipse is very powerful, and EclipseCDT is a good C ++ integrated development environment. After compiling OpenCV2.3.1 in Ubuntu, compile a small program to test whether the compilation is successful, and briefly study the use of EclipseCDT. Compile the OpenCV code and use the makeinstall command to install OpenCV to the/usr/local/directory by default. Add the file directory, library directory, and used OpenCV library files to EclipseCDT.
Eclipse has powerful functions. Eclipse CDT is a good Integrated C ++ development environment. After compiling the OpenCV 2.3.1 library in Ubuntu, to test whether the compilation is successful, compile a small program and briefly study the use of Eclipse CDT.
Compile the OpenCV code and use the make install command to install OpenCV to the/usr/local/directory by default. Add the file directory, library directory, and used OpenCV library file to Eclipse CDT.
Set the compilation parameters in Project Properties> C/C ++ Build> Settings. I am using GCC C ++ Compiler.
In Tool Settings-> gcc c ++ Compiler-> Directories, add the directory of the OpenCV header file:/usr/local/include
Then, in Tool Settings-> gcc c ++ Linker-> Libraries, add the library file directory of OpenCV:/usr/local/lib, and add the used OpenCV library, instead of the library file name libopencv_xxx.xxx, it removes the beginning and end, leaving only opencv_xxx, such as opencv_core.
After setting, you can compile and run the OpenCV program.