質問編集履歴

1

回答にあったサイトからファイルをダウンロードし,コピーしたら次はこのようなエラーが出ました.どのようにしたら解決できますか.

2021/04/30 05:16

投稿

abcde12345
abcde12345

スコア3

test CHANGED
File without changes
test CHANGED
@@ -10,13 +10,33 @@
10
10
 
11
11
  ```
12
12
 
13
- fatal error: pthread.h: No such file or directory
13
+ In file included from c:\mingw\include\pthread.h:288:0,
14
14
 
15
- #include<pthread.h>
15
+ from 5-1.c:4:
16
16
 
17
- ^
17
+ c:\mingw\include\sched.h:152:47: error: unknown type name 'pid_t'
18
18
 
19
+ PTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy);
20
+
21
+ ^~~~~
22
+
23
+ c:\mingw\include\sched.h:154:47: error: unknown type name 'pid_t'
24
+
25
+ PTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid);
26
+
19
- compilation terminated.
27
+ In file included from 5-1.c:4:0:
28
+
29
+ c:\mingw\include\pthread.h:307:8: error: redefinition of 'struct timespec'
30
+
31
+ struct timespec {
32
+
33
+ ^~~~~~~~
34
+
35
+ In file included from c:\mingw\include\pthread.h:218:0,
36
+
37
+ from 5-1.c:4:
38
+
39
+
20
40
 
21
41
  ```
22
42