Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

Beginners • undefined reference to `wiringPiSetupGpio' 

$
0
0
After purchasing Raspberrypi4B and installing it, I created a sample program and built it.
A link error will occur.

This is a basic link error, but please provide a solution or any helpful comments.

gcc -Wall -I/usr/local/include -I/usr/include -IwiringPi -lpthread -lcrypt -lm -L/usr/lib,/usr/local/lib,/usr/lib/aarch64-linux-gnu -o hssprg001 hssprg001.o

/usr/bin/ld: hssprg001.o: in function `main':
hssprg001.c:(.text+0x14): undefined reference to `wiringPiSetupGpio'
/usr/bin/ld: hssprg001.c:(.text+0x30): undefined reference to `pinMode'
/usr/bin/ld: hssprg001.c:(.text+0x38): undefined reference to `pwmSetMode'
/usr/bin/ld: hssprg001.c:(.text+0x40): undefined reference to `pwmSetRange'
/usr/bin/ld: hssprg001.c:(.text+0x54): undefined reference to `pwmWrite'
/usr/bin/ld: hssprg001.c:(.text+0x5c): undefined reference to `delay'
/usr/bin/ld: hssprg001.c:(.text+0x68): undefined reference to `pwmWrite'
/usr/bin/ld: hssprg001.c:(.text+0x70): undefined reference to `delay'
collect2: error: ld returned 1 exit status

Thank you.

Statistics: Posted by Taka Y — Sun Dec 15, 2024 12:11 am



Viewing all articles
Browse latest Browse all 4909

Trending Articles