this is the error
inputgpio.o: In function `main':inputgpio.cpp:(.text.startup+0x4): undefined reference to `wiringPiSetup'inputgpio.cpp:(.text.startup+0x18): undefined reference to `pinMode'inputgpio.cpp:(.text.startup+0x20): undefined reference to `digitalRead'collect2: ld returned 1 exit statusmake: *** [input] Error 1
this is my code
#include <iostream>#include <wiringPi.h>using namespace std;int main(){if(wiringPiSetup() == -1){ cout << "gpio not functioning " << endl;}int input;pinMode (1, INPUT);input = digitalRead(1);if((input == 1)){ cout << "input = true" << endl;}}
Background info, i wrote this using vim, compiled using qmake, and i did add wiringPi.h to the sources.