EE_DSnP 板


LINE

想說要測試一下-O3的威能,就按照版上的文 將(1)src/Makefile.in 的 -g 改成 -O3 (2)Makefile 的 @strip bin/$(EXEC) 前的 # 拿掉 但是,先經過 make clean 再 make a 或 d 時, 會出現以下的error message: Cleaning util... make[1]: *** No rule to make target `dlist', needed by `.depend.mak'. Stop. Cleaning main... Removing libutil.a... Removing adtTest.dlist... Checking util... make[1]: *** No rule to make target `dlist', needed by `.depend.mak'. Stop. Checking main... > compiling: adtTest.cpp > compiling: main.cpp > building adtTest.dlist... adtTest.o: In function `AdtResetCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': adtTest.cpp:(.text+0x190): undefined reference to `myStr2Int(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)' adtTest.o: In function `AdtPrintCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': adtTest.cpp:(.text+0xbf5): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0xe9d): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.o: In function `AdtDeleteCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': adtTest.cpp:(.text+0xfc9): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0x1196): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0x11d9): undefined reference to `myStr2Int(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)' adtTest.cpp:(.text+0x12af): undefined reference to `rnGen' adtTest.cpp:(.text+0x1377): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0x13c8): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0x1419): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.o: In function `AdtAddCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': adtTest.cpp:(.text+0x17db): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0x1828): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' adtTest.cpp:(.text+0x185a): undefined reference to `myStr2Int(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)' adtTest.cpp:(.text+0x1949): undefined reference to `myStr2Int(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)' main.o: In function `main': main.cpp:(.text+0x43b): undefined reference to `myUsage' main.cpp:(.text+0x455): undefined reference to `myUsage' main.cpp:(.text+0x45d): undefined reference to `myUsage' main.cpp:(.text+0x463): undefined reference to `myUsage' main.cpp:(.text+0x697): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' ../../lib/libcmd.a(cmdCommon.o): In function `HistoryCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': cmdCommon.cpp:(.text+0x442): undefined reference to `myStr2Int(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)' ../../lib/libcmd.a(cmdCommon.o): In function `QuitCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': cmdCommon.cpp:(.text+0xd59): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' cmdCommon.cpp:(.text+0xea6): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' ../../lib/libcmd.a(cmdCommon.o): In function `UsageCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': cmdCommon.cpp:(.text+0x12f6): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x1326): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x1334): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x133f): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x1345): undefined reference to `myUsage' ../../lib/libcmd.a(cmdCommon.o):cmdCommon.cpp:(.text+0x1367): more undefined references to `myUsage' follow ../../lib/libcmd.a(cmdCommon.o): In function `UsageCmd::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': cmdCommon.cpp:(.text+0x153f): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' cmdCommon.cpp:(.text+0x1696): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x169b): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x16c5): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x16cb): undefined reference to `myUsage' cmdCommon.cpp:(.text+0x1823): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' cmdCommon.cpp:(.text+0x18e3): undefined reference to `myStrNCmp(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)' ../../lib/libcmd.a(cmdParser.o): In function `CmdExec::lexSingleOption(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) const': cmdParser.cpp:(.text+0x31a): undefined reference to `myStrGetTok(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, char)' ../../lib/libcmd.a(cmdParser.o): In function `CmdExec::lexOptions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, unsigned int) const': cmdParser.cpp:(.text+0x13d9): undefined reference to `myStrGetTok(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, char)' ../../lib/libcmd.a(cmdCharDef.o): In function `CmdParser::getChar(std::basic_istream<char, std::char_traits<char> >&) const': cmdCharDef.cpp:(.text+0xe): undefined reference to `myGetChar(std::basic_istream<char, std::char_traits<char> >&)' cmdCharDef.cpp:(.text+0x7e): undefined reference to `myGetChar(std::basic_istream<char, std::char_traits<char> >&)' cmdCharDef.cpp:(.text+0x8e): undefined reference to `myGetChar(std::basic_istream<char, std::char_traits<char> >&)' cmdCharDef.cpp:(.text+0xbf): undefined reference to `myGetChar(std::basic_istream<char, std::char_traits<char> >&)' collect2: ld 回傳 1 make[1]: *** [../../bin/adtTest.dlist] Error 1 make: *** [main] Error 2 看起來像是有些library沒有被include進來... 想了很久不知道怎麼fix這些error... 不知道有沒有人有這個問題?? 麻煩版上各位幫忙解惑XD 謝謝^^ --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.248.220
1F:推 ric2k1:試著 rm -f src/*/.depend.mak 看看? 12/03 23:53
2F:→ lleyfede:還是相同的error message... 12/04 19:36
3F:→ lleyfede:連原本的-g都出問題了... 12/04 20:38
4F:推 ric2k1:tar 起來寄給我看一下... 12/04 21:50
5F:→ lleyfede:教授我寄到你的信箱了~ 12/04 22:05
6F:→ lleyfede:我剛剛重新去課程網下載hw5.tgz就可以使用-O3了 12/04 22:06
7F:推 ric2k1:因為你的 src/util 底下有個檔案叫 "dlist _ver1.h"...orz 12/04 22:43
8F:→ ric2k1: ^ 有空格... 12/04 22:43
9F:推 ric2k1:把 "$CHDRS" 搞爛了... 12/04 22:45
10F:→ lleyfede:Orz...原來如此,謝謝教授^^ 12/04 22:50







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Soft_Job站內搜尋

TOP