複数のsource fileを使ったprogramをbuildする手順は以下のような感じ。
ここでは、例として
project名 | : xcd_example1 |
main関数のあるsource | : main.c |
Sub関数のあるsource | : func1.c |
手順としては、
1) xcd_example1というprojectを作る。
2) Navigator areaのxcd_example1辺りを右クリックして[New File...]を選択。

C Fileを選択して[Next]


Name:のところにfunc1.cと入力して[Next]


ここでは敢えて別Directoryにfunc1.cを置いてみる。
なので、左下の[New Folder]ボタンを押して
Name of new folderのところにsub_funcと入力して[Create]、で[Create]

なので、左下の[New Folder]ボタンを押して
Name of new folderのところにsub_funcと入力して[Create]、で[Create]

これで2つsource fileを使うBaseができた。
で、sourceの内容は適当に行ったり来たりするようにしてみる。
-
main.c
|
-
func1.c
|
-
func1.h
|
[cmd]+[R]でBuildしてみる。
