Code: Select all
#include <wiringPi.h>
int main(void) {
wiringPiSetup ();
pinMode (0, OUTPUT);
int i;
for(i = 0; i < 10; ++i) {
digitalWrite (0, HIGH); delay(500);
digitalWrite (0, LOW); delay(500);
}
return 0;
}But I keep getting this compiler error and do not know how to fix it.
wire.c: In function 'main':
wire.c:5:14: error: 'OUPUT' undeclared (first use in this function)
wire.c:5:14: note: each undeclared identifier is reported only once
for each function it appears in
Edit: I made a silly type. OUPUT instead of OUTPUT. But now I get this new issue:
/usr/bin/ld: cannot find -lwiringpi
collect2: ld returned 1 exit status
Help would be appreciated. Thanks, and have a nice day!