Page 1 of 1

wiringPi Issues

Posted: Tue Mar 18, 2014 11:51 pm
by thenameisbond

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;
}
That is the code I want to run to blink an led 10 times.

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!

Re: wiringPi Issues

Posted: Wed Mar 19, 2014 4:31 am
by joan
-lwiringPi

Linux is case sensitive.

Re: wiringPi Issues

Posted: Wed Mar 19, 2014 6:53 am
by thenameisbond
Thank you for your help.