fork download
  1. #include <stdio.h>
  2. #include <pthread.h>
  3.  
  4. void* func(void *data) {
  5. printf("kita------\n");
  6. return (void *) NULL;
  7. }
  8.  
  9. int main() {
  10. pthread_t th;
  11.  
  12. //printf("テスト\n"); // ここを有効にすると下のでないおがでるお!!!
  13.  
  14. pthread_create(&th, NULL, &func, NULL);
  15. pthread_join(th, NULL);
  16.  
  17. printf("ここでないお?!\n");
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/3OjKU8/cczonwJi.o: In function `main':
prog.c:(.text+0x41): undefined reference to `pthread_create'
prog.c:(.text+0x55): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty