I have installed the raspicam api as per the instructions. There were no errors.

Now when I try to compile the example programs or any of my own programs using the API, I get the compile error:

fatal error: raspicam.h: No such file or directory

I have tried updating the pi, restarting and installing previous versions. I also copied the .h files into /usr/local/lib/raspicam as the header files were not there as the readme suggested they should be.

Does anyone have a solution to this?

  • 1
    try to compile with -raspicam gcc program.c -o program -lraspicam – Makhlouf GHARBI Oct 8 '14 at 12:57
  • 1
    I'm embarrassed that was the answer, but thanks! I forgot to add it into my program's makefile. The example cmake chain clearly misses this too... Thanks again! – user2290362 Oct 8 '14 at 13:09
  • @MakhloufGHARBI I don't understand -raspicam part, also could you elaborate your solution? Thanks! – bakalolo Oct 17 '18 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.