How to configure CMakeList in Clion ide for using POSIX pthread functions?
问题 I tried to compile a simple POSIX example in CLIon ide, but it doesn`t know about pthread library, I think... Here is the code: void *func1() { int i; for (i=0;i<10;i++) { printf("Thread 1 is running\n"); sleep(1); } } void *func2() { int i; for (i=0;i<10;i++) { printf("Thread 2 is running\n"); sleep(1); } } int result, status1, status2; pthread_t thread1, thread2; int main() { result = pthread_create(&thread1, NULL, func1, NULL); result = pthread_create(&thread2, NULL, func2, NULL); pthread