作者trancewu (exile me)
看板EE_DSnP
標題[問題] undefined reference to `ModNum::_varMap'
時間Tue Apr 8 08:52:54 2008
殺完蟲之後make test
最後要building testMC時出現這問題@@
重新下載檔案只把修改過後的.cpp .h丟進去make test,
也出現這問題。
google一下好像是linking出現問題...
請問這該檢查哪些地方@@
謝謝。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.4.235
1F:推 ric2k1:You need to initialize the static variable of a class 04/08 09:01
2F:→ ric2k1:in some .cpp file. 04/08 09:02
3F:→ ric2k1:Ant's book, v5, Sec 10.7. 04/08 09:05
4F:→ trancewu:謝謝教授,OK了 04/08 11:05
5F:推 aemaeth:那我想請問一下initial的值是自己訂的嗎@@? 04/08 13:10
6F:推 ric2k1:For a class object, "A a;" is a declaration and initial 04/08 17:17
7F:→ ric2k1:It will call the default constructor for initialization 04/08 17:18
8F:推 aemaeth:嗯嗯 謝謝教授! 04/09 01:01