login|Register
Forum > Beginners
Post|
看5578|回1|Favorite
diyer 看全部
2017-3-6 19:54:45
hello there,
i'm unable to compile examples from wiringop.
this is my output:

code:

  1. zero@orangepizero:~/WiringOP/examples$ gcc -o blink blink.c -lwiringPi
  2. //usr/local/lib/libwiringPi.so: undefined reference to `pthread_join'
  3. //usr/local/lib/libwiringPi.so: undefined reference to `pthread_create'
  4. //usr/local/lib/libwiringPi.so: undefined reference to `pthread_cancel'
  5. collect2: error: ld returned 1 exit status



what's the matter?

someone 看全部
2017-3-11 04:43:05
You also have to link in the pthread library.  

This should get you going:

gcc -o blink blink.c -lwiringPi -lpthread

OrangePi En

Powered by Discuz! X3.4

homepage|Simple edition|Touch edition|PC