teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

ファイルの分割を増やしました

2021/06/02 12:25

投稿

cat_is_freedom
cat_is_freedom

スコア6

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,7 @@
1
1
  main.c
2
2
  ```ここに言語を入力
3
3
  #include <stdio.h>
4
- #include "lib1.h"
4
+ #include "lib.h"
5
5
 
6
6
  int main(void){
7
7
  int c = func1(11 , 22);
@@ -9,18 +9,22 @@
9
9
  return 0;
10
10
  }
11
11
  ```
12
- lib.h
12
+ lib.c
13
13
  ```ここに言語を入力
14
14
  #include <stdio.h>
15
+ #include "lib.h"
15
16
 
16
- int func1(int a , int b);
17
-
18
17
  int func1(int a , int b){
19
18
  return a + b;
20
19
  }
21
20
  ```
21
+ lib.h
22
+ ```ここに言語を入力
23
+ int func1(int a , int b);
24
+ ```
22
25
 
23
26
 
27
+
24
28
  のようにファイルを分割した場合、makefileを作成しmakeするだけで.exeファイルまで作成させれるようにするには、makefileに何を記述したら良いのでしょうか?
25
29
 
26
30
  コンパイラ bcc32

1

不備

2021/06/02 12:25

投稿

cat_is_freedom
cat_is_freedom

スコア6

title CHANGED
File without changes
body CHANGED
@@ -20,4 +20,8 @@
20
20
  }
21
21
  ```
22
22
 
23
+
23
- のようにファイルを分割した場合、makefileを作成しmakeするだけで.exeファイルまで作成させれるようにするには、makefileに何を記述したら良いのでしょうか?
24
+ のようにファイルを分割した場合、makefileを作成しmakeするだけで.exeファイルまで作成させれるようにするには、makefileに何を記述したら良いのでしょうか?
25
+
26
+ コンパイラ bcc32
27
+ 環境 windows10