Error linking with pthread library
Closed this issue · 2 comments
sloweax commented
Not sure what was changed, but getting this error when trying to build on Ubuntu 20.04.6 LTS with gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
/opt/proxyrot# make
cc -Wall -Wextra -g -lpthread proxyrot.o util.o socks5.o proxy.o -o proxyrot
/usr/bin/ld: proxyrot.o: in function `main':
/opt/proxyrot/proxyrot.c:153: undefined reference to `pthread_create'
/usr/bin/ld: /opt/proxyrot/proxyrot.c:158: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make: *** [Makefile:12: proxyrot] Error 1
Originally posted by @JReming85 in #1 (comment)
sloweax commented
Thanks for reporting it, I got the order of the command wrong. should be fixed in c588675
Could you test to see if it compiles with no problems?
JReming85 commented
That did the trick!!
Thanks