[問題] Visual Studio include 問題

看板C_and_CPP作者 (純粹的存在)時間14年前 (2011/05/23 16:02), 編輯推噓2(203)
留言5則, 4人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VC++ 2008 問題(Question): 由網路上下載的 open source code 中有 .vcproj 檔 從該檔案開起來後,VC 自動建立的資料夾架構如下 └src ├Header Files │├xxx.h │├xxx.h │└... ├Resource Files └Source Files 但每個.h檔在下載下來的資料夾中屬於不同的資料夾 程式中 include 很多都是 #include "folder1/xxx.h" compile 時卻要將 include 改為 #include "xxx.h" compiler 才不會 complain 一個大 project 裡全都這樣寫 要 compile 不可能要一個一個修改吧 請問我是不是有什麼東西沒設定才會這樣? 錯誤結果(Wrong Output): 1>d:\...\src\client\snd_file.c(34) : fatal error C1083: Cannot open include file: 'vorbis/vorbisfile.h': No such file or directory -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.116.72.40

05/23 16:09, , 1F
VC的Solution Explorer裡的結構和你實際的資料夾存放路徑
05/23 16:09, 1F

05/23 16:10, , 2F
是兩回事
05/23 16:10, 2F
※ 編輯: regeditj 來自: 140.116.72.41 (05/23 16:52)

05/23 19:12, , 3F
專案->屬性->C/C++->一般->其他include目錄 你要的是這個嗎?
05/23 19:12, 3F

05/23 20:29, , 4F
然後把標頭檔(.h)及資源檔(.lib)所在的資料夾加入就ok
05/23 20:29, 4F

05/25 23:14, , 5F
謝謝A大 我應該是跑到錯的地方設定了
05/25 23:14, 5F
文章代碼(AID): #1DsXIQTt (C_and_CPP)