ubuntu 14.04 complie C 問題 - Linux

Table of Contents

大家好,我是linux新手

我在ubuntu14.04的環境下執行.C檔

遇到了一些小問題

我想編譯pre_processor.c這個檔

輸入gcc -o pre_processor pre_processor.c

出現了下面這個error
https://imgur.com/WutAmkr

這主要是因為header的問題嗎

我程式碼裡有include以下這些header
https://imgur.com/25kAkE8

這些header分別都在不同的資料夾底下
這些header分別都在不同的資料夾底下

如果要compile這個pre_processor的檔

是要用makefile的方法嗎 還是有其他方法可行

拜託大家幫忙:)

--

All Comments

Callum avatarCallum2018-12-28
man gcc參考一下
-I 參數,參考一下
Valerie avatarValerie2018-12-29
感謝b大回覆 我研究一下
Rae avatarRae2018-12-31
這不叫「執行.C」而是「編譯」
Isla avatarIsla2019-01-04
好的 了解
Kristin avatarKristin2019-01-06
Makefile 只是把指令預寫在設定檔內再執行
這情形應該是用 -I