vc2008 對頭文件的識別問題!

今天在用VC2008 對 我的 “Tree_Recognition”  project  進行編譯時,老是發現  在頭文件segment .h 中定義的一個 'superSegment' 無法識別,

在line 567 :       superSegment seg;

總是說,

h:\myprogramimg\tree_recognition\tree_recognition.cpp(567) : error C2065: 'superSegment' : undeclared identifier

即使我 1、把 “segment .h ” 加到 "Tree_Recognition.cpp“ 中

               2、並且把 “segment .h ” 也加到project 中

還是無法識別,網上找了很久 都沒有找到合適的答案。

               3、索性在 project 的 properties 中在C/C++ --------General  ——— Additional Include Directories  中再 加上 segment .h 所在的目錄:“../superpixel/ ” 

這下,編譯通過

怎麼是這裏出了問題呢? 沒有想通,一般來說(以前的項目驗證過可行)只需要1 和 2  這兩步就OK,但這次卻非要 第 3 步。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章