作者ChenRobert (羅伯陳)
看板C_and_CPP
標題[問題] 請教Dev C++專案問題
時間Wed Jul 11 19:18:05 2018
開發平台(Platform): (Ex: Win10, Linux, ...)
Dev C++
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
C
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
自己寫的C code
問題(Question):
#include "c_comp.c"
我main.c 餵入c_comp.c
可是在資料夾路徑是:
aaa/practice/main.c
aaa/Library/c_comp.c
可是我左邊專案都把他設定在同一個子資料夾裡面
請問#include 要怎麼寫?
還是Dev 要怎麼放?
否則都找不到file?
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 64.190.110.236
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1531307888.A.08A.html
→ hakman: include .c 檔,所以你要main.c 時compile 一次c_comp.c檔 07/11 22:14
→ hakman: compile c_comp.c 又compile 一次,這樣會怎樣你知道嗎? 07/11 22:15
→ hakman: 或者你要不要說一下,你為什麼要include .c 檔? 07/11 22:17
→ loveflames: include c檔是在亂搞什麼飛機 07/11 22:26
→ sarafciel: 原PO應該是超級新手? 感覺是想把兩個.c檔一起編譯? 07/11 22:42
→ sarafciel: 狀況允許的話 我是建議新手在win上面開發先弄Visual 07/11 22:44
→ Sex5F: 1.太老舊了去裝VM 2.google include head file 07/11 22:45
→ Sex5F: 如果include .c 會產生link issue 07/11 22:45
→ sarafciel: Studio來用 等你會寫makefile再來用dev c++ 07/11 22:46