1

When I try to compile I get this error:

fatal error: wiringPi.h: No such file or directory 
#include < wiringPi.h>
                      ^

enter image description here

The code is:

enter image description here

My includes are:

#include < wiringPi.h>
#include < stdio.h>

#define LEDPIN 0 

I have double and triple checked the spelling on everything, and WiringPi is installed. What am I missing?

Aurora0001
  • 6,308
  • 3
  • 23
  • 38
dka13
  • 163
  • 2
  • 4
  • 13

3 Answers3

3

The problem is the space after the <. The system is looking for a file called " wiringPi.h" rather than "wiringPi.h".

I.e. use

#include <wiringPi.h>
#include <stdio.h>
joan
  • 71,014
  • 5
  • 73
  • 106
0

The space after < causes problem. #include < wiringPi.h> ==> Wrong #include <wiringPi.h> ==> Correct. Some sample codes at various sites are having this typo error. :-)

-1

As the answer is already given I just want to share that you can use #include if you are using C++ (and not C). It will import all the libraries in the beginning. However, it will give increase the compilation time for the program.

Rishi
  • 74
  • 6