View: 5773|Reply: 1

WiringOP problem

[Copy link]

5

threads

6

posts

29

credits

Novice

Rank: 1

credits
29
Published in 2017-3-6 19:54:45 | Show all floors |Read mode
hello there,
i'm unable to compile examples from wiringop.
this is my output:
  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

Copy code


what's the matter?

0

threads

3

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2017-3-11 04:43:05 | Show all floors
You also have to link in the pthread library.  

This should get you going:

gcc -o blink blink.c -lwiringPi -lpthread
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list