-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
Spencer Riffle edited this page Jun 13, 2023
·
6 revisions
1. OpenCV requires an older version of g++ to build correctly.
Once you have build its libraries with g++-7, specifically
version 7.5.0, you may update to the latest version of c++
2. You may use these commands to update and select alternative compiler versions (replace 10 10 with the version number you desire):
sudo apt -y install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
sudo update-alternatives --config g++
g++ --version
3. Your version of C++ when compiling may not line up with the version you expect it will compile in. Be sure to specify the c++ version the compiler will use.
1. Use 'sudo update-alternatives --config g++' and change your g++ instance to any version 7 or below.
2. 'Make' your program again and see if the issue is resolved.
2a. If OpenCV refuses to work later, it is most likely because it needs a newer version of g++ (10 or above is recommended)
1. https://learnopencv.com/getting-started-opencv-cuda-module/