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灯, 水草

请输入看板名称,例如:Boy-Girl站内搜寻

TOP