I have client server code. LinServer.cpp using pthread to continuously listen client. I created make file to compile all togather:
all: LinServer LinClient
LinServer:
g++ LinServer.cpp -o LinServer -pthread
LinClient:
g++ LinClient.cpp -o LinClient -pthread
I also tried with -lpthread but same error:
LinServer.cpp:(.text+0x29b): undefined reference to `pthread_create'
LinServer.cpp:(.text+0x2a7): undefined reference to `pthread_detach'
collect2: error: ld returned 1 exit status
make: *** [LinServer] Error 1
Any idea what's the problem here?