1 | initial version |
A solution for me was to compile with gcc-5 for the CUDA part.
So I did:
sudo apt install gcc-5 g++-5
cd opencv
git co 3.4.1
cd build
rm -rf *
cmake \
-D BUILD_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=RELEASE \
-D WITH_CUDA=ON \
-D CUDA_GENERATION="Pascal" \
-D CUDA_HOST_COMPILER:FILEPATH=/usr/bin/gcc-5 ..
make
The important lines are the installation of both gcc and g++ version 5 and the flag CUDA_HOST_COMPILER:FILEPATH=/usr/bin/gcc-5
.