I know several posts have been made about this, but after looking through them I still cannot solve this issue. i am trying to control a stepper motor with wiringpi but when i try to compile i get the undefined reference to error for wiringpitsetupgpio, pinmode, digitalwrite and delay.
I compile in the terminal with this line:
My code includes the wiringpi header and ive checked that the wiringpi folder is in the same directory as the text file. Ive also uninstalled and reinstalled wiringpi and upgraded and updated everything. I'm also a beginner to c++ and the rpi so any help would be greatly appreciated!
Code: Select all
g++ -Wall -o stepper stepper.cpp -Iwiringpi
Thanks in advance.