看板 PangSir 關於我們 聯絡資訊
※ 引述《jztan (taekwon kid ><''')》之銘言: : b91109@linux7:~/working_space> gcc -o server b91902109_s.cc : b91902109_s.cc: In function `int main(int, char**)': : b91902109_s.cc:60: error: invalid conversion from `int*' to `socklen_t*' : 以上是 .cc : ------------------------------------------------------------------------------ : b91109@linux7:~/working_space> gcc -o server b91902109_s.c : b91109@linux7:~/working_space> : 這是copy成 .c 的. : code一行都沒有改,只是換了副檔名. 我的錯誤訊息: Mgtmc@linux3 gcc client.cc /tmp/ccHG2etf.o(.text+0x16d): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `std::ios_base::Init::Init[in-charge]()' /tmp/ccHG2etf.o(.text+0x19e): In function `__tcf_0': : undefined reference to `std::ios_base::Init::~Init [in-charge]()' /tmp/ccHG2etf.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status ----------------------------------------------------------------------------- Mgtmc@linux3 gcc server.cc server.cc: In function `int main(int, char**)': server.cc:61: error: invalid conversion from `int*' to `socklen_t*' ------------------------------------------------------------------------------ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.184.75.106
jztan:client的話用g++就可以成功的compile (.cc) 140.112.241.95 03/20