Compiling OpenCV 3.1 on Ubuntu 16.04

| No Comments

16.04 uses gcc 5.4 by default. You'll need to install gcc 4.9 and configure OpenCV to use 4.9 instead:

sudo apt-get install g++-4.9
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-4.9 -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.9 .

If you have CUDA installed you may want to disable compiling the CUDA libraries as well, or else suffer another hour+ of compilation time. Add -DWITH_CUDA=OFF to disable CUDA.

Leave a comment

Myself

Projects

Monthly Archives

Photos

About this Entry

This page contains a single entry by Robert W. Rose published on September 4, 2016 11:27 PM.

Cheater chashu ramen was the previous entry in this blog.

Displaying a sequence of images in iPython Notebooks is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.