討論串[問題] undefined reference to ..
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者ephesians (ephesians)時間18年前 (2007/04/04 14:53), 編輯資訊
0
0
0
內容預覽:
我在做類似的事情,我的處理法是:. g++ -c hashmap.cpp. g++ -o test hashtest2.cpp. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 59.112.226.125.

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者tinlans ( )時間18年前 (2007/04/04 12:36), 編輯資訊
0
0
0
內容預覽:
關於這個你必須要在 .cpp 內的 template 定義式之前加上 export,. 不過 g++ 沒有支援 export 這個功能,. 所以你必須把 template 定義在 header file 內。. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 61.230.22

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者kornelius (Kornelius)時間18年前 (2007/04/04 03:51), 編輯資訊
0
0
1
內容預覽:
http://tinyurl.com/396nxb. 我在這頁找到. G++ requires template header in the same file as implementation. In practiceit means implementation inside .h file.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者kornelius (Kornelius)時間18年前 (2007/04/04 03:08), 編輯資訊
0
0
0
內容預覽:
我在 hashmap.h 內定義. 然後在 hashmap.cpp 內實做. 主程式寫在 hashtest2.cpp. 然後編譯,卻出現這樣的 bug ,一直想不透是什麼問題...搞了好久啊啊啊 Orz. 也檢查過,也沒有忘了實做的函數. $ g++ hashtest2.cpp hashmap.cp
(還有579個字)
首頁
上一頁
1
下一頁
尾頁