不知道是不是系上工作站系統的問題還是code的問題
若把code直接下載回來編譯會出現
以下的錯誤訊息
其中大多是跟gcc裡面lib相關的error(如有標黃色的部份 即是一個例子)
不知道該如何解決...||
對了我使用ccws2,ccws4...等不同版本的kernel錯誤訊息會有些不同
但是都是都是這樣的一大串就對了
Checking cmd...
Checking calc...
Checking util...
Checking main...
> building modCalc...
../../lib/libcmd.a(cmdParser.o)(.gnu.linkonce.t._ZN9__gnu_cxx10__mt_allocISt13
_Rb_tree_nodeISt4pairIKSsP7CmdExecEENS_20__common_pool_policyINS_6__poolELb1EE
EE10deallocateEPS7_j[__gnu_cxx::__mt_alloc<std::_Rb_tree_node<std::pair<std::b
asic_string<char, std::char_traits<char>, std::allocator<char> > const, CmdExe
c*> >, __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::deallocate(
std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, s
td::allocator<char> > const, CmdExec*> >*, unsigned int)]+0x5f): In function `
__gnu_cxx::__mt_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std
::char_traits<char>, std::allocator<char> > const, CmdExec*> >, __gnu_cxx::__c
ommon_pool_policy<__gnu_cxx::__pool, true> >::deallocate(std::_Rb_tree_node<st
d::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const, CmdExec*> >*, unsigned int)':
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ext/mt_allo
cator.h:746: undefined reference to `__gnu_cxx::__pool<true>::_M_reclaim_block
(char*, unsigned int)'
../../lib/libcalc.a(calcCmd.o)(.text+0x553): In function `MprintCmd::exec(std:
:basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/B93/b3901160/dsnp/hw3/src/calc/calcCmd.cpp:202: undefined reference to `
ModNum::ModNum(unsigned int)'
../../lib/libcalc.a(calcCmd.o)(.text+0x59c):/home/B93/b3901160/dsnp/hw3/src/ca
lc/calcCmd.cpp:203: undefined reference to `ModNum::getVarVal(std::basic_strin
g<char, std::char_traits<char>, std::allocator<char> > const&, ModNum&)'
../../lib/libcalc.a(calcCmd.o)(.text+0x5fa):/home/B93/b3901160/dsnp/hw3/src/ca
lc/calcCmd.cpp:204: undefined reference to `operator<<(std::basic_ostream<char
, std::char_traits<char> >&, ModNum const&)'
../../lib/libcalc.a(calcCmd.o)(.text+0x64c):/home/B93/b3901160/dsnp/hw3/src/ca
lc/calcCmd.cpp:210: undefined reference to `ModNum::printVars()'
../../lib/libcalc.a(calcCmd.o)(.text+0x73a): In function `MvarCmd::exec(std::b
asic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/B93/b3901160/dsnp/hw3/src/calc/calcCmd.cpp:64: undefined reference to `M
odNum::ModNum(unsigned int)'
../../lib/libcalc.a(calcCmd.o)(.text+0x75d):/home/B93/b3901160/dsnp/hw3/src/ca
lc/calcCmd.cpp:65: undefined reference to `ModNum::getStrVal(std::basic_string
<char, std::char_traits<char>, std::allocator<char> > const&, ModNum&)'
../../lib/libcalc.a(calcCmd.o)(.text+0x7b2):/home/B93/b3901160/dsnp/hw3/src/ca
lc/calcCmd.cpp:68: undefined reference to `ModNum::setVarVal(std::basic_string
<char, std::char_traits<char>, std::allocator<char> > const&, ModNum const&)'
../../lib/libcalc.a(calcCmd.o)(.text+0x7f7):/home/B93/b3901160/dsnp/hw3/src/ca
lc/calcCmd.cpp:69: undefined reference to `operator<<(std::basic_ostream<char,
std::char_traits<char> >&, ModNum const&)'
../../lib/libcalc.a(calcCmd.o)(.gnu.linkonce.t._ZN6ModNum10setModulusEj[ModNum
::setModulus(unsigned int)]+0x7): In function `ModNum::setModulus(unsigned int
)':
/home/B93/b3901160/dsnp/hw3/src/calc/calcModNum.h:27: undefined reference to `
ModNum::_modulus'
../../lib/libcalc.a(calcCmd.o)(.gnu.linkonce.t._ZN6ModNum10getModulusEv[ModNum
::getModulus()]+0x4): In function `ModNum::getModulus()':
/home/B93/b3901160/dsnp/hw3/src/calc/calcModNum.h:28: undefined reference to `
ModNum::_modulus'
../../lib/libcalc.a(calcCmd.o)(.gnu.linkonce.t._ZN9__gnu_cxx10__mt_allocISsNS_
20__common_pool_policyINS_6__poolELb1EEEE10deallocateEPSsj[__gnu_cxx::__mt_all
oc<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, __g
nu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::deallocate(std::basic
_string<char, std::char_traits<char>, std::allocator<char> >*, unsigned int)]+
0x59): In function `__gnu_cxx::__mt_alloc<std::basic_string<char, std::char_tr
aits<char>, std::allocator<char> >, __gnu_cxx::__common_pool_policy<__gnu_cxx:
:__pool, true> >::deallocate(std::basic_string<char, std::char_traits<char>, s
td::allocator<char> >*, unsigned int)':
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ext/mt_allo
cator.h:746: undefined reference to `__gnu_cxx::__pool<true>::_M_reclaim_block
(char*, unsigned int)'
../../lib/libcalc.a(calcCmd.o)(.gnu.linkonce.t._ZN9__gnu_cxx10__mt_allocISt13_
Rb_tree_nodeISt4pairIKSs6ModNumEENS_20__common_pool_policyINS_6__poolELb1EEEE1
0deallocateEPS6_j[__gnu_cxx::__mt_alloc<std::_Rb_tree_node<std::pair<std::basi
c_string<char, std::char_traits<char>, std::allocator<char> > const, ModNum> >
, __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::deallocate(std::
_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::a
llocator<char> > const, ModNum> >*, unsigned int)]+0x5f): In function `__gnu_c
xx::__mt_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_
traits<char>, std::allocator<char> > const, ModNum> >, __gnu_cxx::__common_poo
l_policy<__gnu_cxx::__pool, true> >::deallocate(std::_Rb_tree_node<std::pair<s
td::basic_string<char, std::char_traits<char>, std::allocator<char> > const, M
odNum> >*, unsigned int)':
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/ext/mt_allo
cator.h:746: undefined reference to `__gnu_cxx::__pool<true>::_M_reclaim_block
(char*, unsigned int)'
../../lib/libcalc.a(calcCmd.o)(.gnu.linkonce.t._ZN6ModNum11resetVapMapEv[ModNu
m::resetVapMap()]+0xa): In function `ModNum::resetVapMap()':
/home/B93/b3901160/dsnp/hw3/src/calc/calcModNum.h:49: undefined reference to `
ModNum::_varMap'
collect2: ld returned 1 exit status
make[1]: *** [../../bin/modCalc] Error 1
make: *** [all] Error 2
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.251.102
※ 編輯: Jyou 來自: 140.112.251.102 (11/14 15:20)
※ 編輯: Jyou 來自: 140.112.251.102 (11/14 15:21)