# Open CV Cmake g++ does not work on Rasbian jessie

I am compiling Open CV library on Raspbian jessie. I get below error .

>   -- Check for working CXX compiler: /usr/bin/g++ -- broken
>     CMake Error at /usr/share/cmake-3.6/Modules/CMakeTestCXXCompiler.cmake:54 (message):
>       The C++ compiler "/usr/bin/g++" is not able to compile a simple test
>       program.


I pointed it to g++-4.9 as well. Still I face the same issue. Any suggestions ?

• Try using /usr/bin/g++ to compile a "Hello world" program. If it doesn't work, delete it and re-install. Check type g++ in Terminal. – Mark Setchell Jul 24 '18 at 11:48
• Thanks!I tried with g++ . But I do not see any change . It still pops up the same error. I actually do not need c++. All I am concentrating is on C. So is there any way I can skip this and build my OpenCV? – pranathi Jul 24 '18 at 12:47