opencv wonderful error
It is possible to install some dependencies, or change the third-party library version such as ceres, and then run your own program, an error such as opencv will appear;
Solution:
method one:
Delete the build of opencv and re:
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_GTK=ON -D OPENCV_GENERATE_PKGCONFIG=YES -D OPENCV_EXTRA_MODULES_PATH=/home/lanzy/opencv-3.4.12/opencv_contrib-3.4.12/modules -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=True …
make -j12
sudo make install
Method Two:
If it still doesn't work, then delete the glog build, and re:
mkdir build
cd build
cmake -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_SHARED_LIBS=ON …
make -j12
sudo make install
Then repeat step one
Method three:
If neither method 1 nor method 2 works, replace ceres with version 2.0.0 and recompile ceres;
At this time, delete the build and devel of the code workspace, and re-catkin_make;
Because the ceres version has changed, when catkin_make, it will report ceres-related errors;
At this time, replace ceres with 1.14, and then in the directory of ceres1.14:
mkdir build
cd build
cmake …
make -j12
sudo make install
Then delete the build and devel of the code workspace to solve the problem of opencv;
If it still doesn't work, then delete the opencv build and recompile opencv;