hypertensiune / ccloc

Fastest lines of code counting tool
MIT License
5 stars 1 forks source link

Update Makefile #1

Closed trivedihem closed 3 months ago

trivedihem commented 3 months ago

I was facing below error on ubuntu 20.04 5.15.153.1-microsoft-standard-WSL2

root@hostname:~/ccloc# make -j4 ar rcs libccloc.a obj/ccloc.o obj/langs.o gcc main.c -o ccloc -L. -lccloc /usr/bin/ld: ./libccloc.a(ccloc.o): in function ccloc': ccloc.c:(.text+0x140f): undefined reference topthread_create' /usr/bin/ld: ccloc.c:(.text+0x144d): undefined reference to `pthread_join' collect2: error: ld returned 1 exit status make: *** [Makefile:18: cli] Error 1

added -lpthread to resolve this