My last post GPIO control for raspberry openCV is use system() function. This post use wiringpi library. I forgot wiringPi initialize. If you added wiringPiSetup(), wiringPi is work. You can download my changed code. Backup your camcv_vid1.cpp and CMakeLists.txt files. Extract zip files And compile and build(cmake and make.) RUN If you see this error