看板 EE_DSnP 關於我們 聯絡資訊
我把大部份的工作完成之後(大概剩跟dofile有關的沒寫) 在HW3底下make 卻出現了這個很囧的訊息 /usr/bin/ld: i386:x86-64 architecture of input file `../../lib/libcmd.a(cmdReader.o)' is incompatible with i386 output ../../lib/libcmd.a(cmdReader.o): In function `CmdParser::addHistory()': cmdReader.cpp:(.text+0x180): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned long)' cmdReader.cpp:(.text+0x1ae): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, unsigned long)' ../../lib/libcmd.a(cmdReader.o): In function `CmdParser::moveToHistory(int)': cmdReader.cpp:(.text+0x82d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned long)' (中略) collect2: ld returned 1 exit status make[1]: *** [../../bin/modCalc] Error 1 make: *** [main] Error 2 這樣是指說cmdReader有錯嗎 還是我的程式的bug造成這個錯誤? 不過他也沒有其他的錯誤訊息了... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.244.34 ※ 編輯: BloodyDuke 來自: 140.112.244.34 (11/15 21:52)
cktigeryang:make 32 11/15 22:06
BloodyDuke:make 32 我試了還是不行耶... 11/15 22:18
BloodyDuke:喔喔 解決了 要先make clean一次 11/15 22:25
qua2:我make clean過了還是有一樣的問題.. 11/17 08:53
qua2:好了 11/17 09:12