EE_DSnP 板


LINE

好奇怪喔 我在Compile的時候會有很多error...然後就會失敗 XD 我memTest.cpp裡面MTD還有MTN還沒寫...是這個原因嘛 @@ ? [b3901019@ccws3 b93901019_HW4]$ make clean Cleaning mem... make[1]: Warning: File `.depend.mak' has modification time 3.1 s in the future make[1]: warning: Clock skew detected. Your build may be incomplete. Cleaning util... Cleaning main... Removing libmem.a libutil.a... Removing memTest... [b3901019@ccws3 b93901019_HW4]$ make Checking mem... make[1]: Warning: File `.depend.mak' has modification time 2.1 s in the future > compiling: memTest.cpp In file included from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/fstream:49, from ../../include/cmdParser.h:5, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-redhat-linux/bits/basic_file.h:47: error: expected unqualified-id before "namespace" In file included from ../../include/cmdParser.h:5, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/fstream:52: error: expected unqualified-id before "namespace" In file included from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/fstream:840, from ../../include/cmdParser.h:5, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/fstream.tcc:40: error: expected unqualified-id before "namespace" In file included from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/stl_tree.h:70, from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/map:66, from ../../include/cmdParser.h:8, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/cpp_type_traits.h:69: error: expected unqualified-id before "namespace" /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/cpp_type_traits.h:80: error: expected unqualified-id before "namespace" In file included from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/map:66, from ../../include/cmdParser.h:8, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/stl_tree.h:72: error: expected unqualified-id before "namespace" In file included from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/map:67, from ../../include/cmdParser.h:8, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/stl_map.h:66: error: expected unqualified-id before "namespace" In file included from /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/map:68, from ../../include/cmdParser.h:8, from memTest.h:7, from memTest.cpp:3: /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/stl_multimap.h:66: error: expected unqualified-id before "namespace" In file included from memTest.h:7, from memTest.cpp:3: ../../include/cmdParser.h:10: error: expected nested-name-specifier before "namespace" ../../include/cmdParser.h:10: error: expected unqualified-id before "namespace" ../../include/cmdParser.h:10: error: expected `;' before "namespace" ../../include/cmdParser.h:10: error: expected unqualified-id before "namespace" ../../include/cmdParser.h:22: error: storage class specified for field `cmdMgr' ../../include/cmdParser.h:125: error: ISO C++ forbids declaration of `map' with no type ../../include/cmdParser.h:125: error: expected `;' before '<' token ../../include/cmdParser.h:161: error: field `_dofile' has incomplete type ../../include/cmdParser.h:171: error: `CmdMap' does not name a type In file included from memTest.cpp:3: memTest.h:9: error: expected nested-name-specifier before "namespace" memTest.h:9: error: expected unqualified-id before "namespace" memTest.h:9: error: expected `;' before "namespace" memTest.h:9: error: expected unqualified-id before "namespace" In file included from ../../include/myUsage.h:12, from ../../include/util.h:6, from memTest.cpp:4: /usr/include/sys/times.h:32: error: expected unqualified-id before string constant In file included from ../../include/util.h:6, from memTest.cpp:4: ../../include/myUsage.h:17: error: expected nested-name-specifier before "namespace" ../../include/myUsage.h:17: error: expected unqualified-id before "namespace" ../../include/myUsage.h:17: error: expected `;' before "namespace" ../../include/myUsage.h:17: error: expected unqualified-id before "namespace" In file included from memTest.cpp:4: ../../include/util.h:8: error: expected nested-name-specifier before "namespace" ../../include/util.h:8: error: expected unqualified-id before "namespace" ../../include/util.h:8: error: expected `;' before "namespace" ../../include/util.h:8: error: expected unqualified-id before "namespace" ../../include/util.h:11: error: storage class specified for field `rnGen' ../../include/util.h:12: error: storage class specified for field `myUsage' ../../include/util.h:15: error: storage class specified for field `myStrNCmp' ../../include/util.h:17: error: storage class specified for field `myStrGetTok' ../../include/util.h:18: error: storage class specified for field `myStr2Int' ../../include/util.h:19: error: storage class specified for field `isValidVarName' ../../include/util.h:22: error: storage class specified for field `myGetChar' ../../include/util.h:23: error: storage class specified for field `myGetChar' memTest.cpp:6: error: expected nested-name-specifier before "namespace" memTest.cpp:6: error: expected unqualified-id before "namespace" memTest.cpp:6: error: expected `;' before "namespace" memTest.cpp:6: error: expected unqualified-id before "namespace" memTest.cpp:9: error: `new' cannot appear in a constant-expression memTest.cpp:9: error: cannot declare member `MemMgr<T>::MemTestObj::_memMgr' within `MemMgr<T>' memTest.cpp:30: error: cannot declare member function `MemMgr<T>::MTResetCmd::exec' within `MemMgr<T>' memTest.cpp:43: error: cannot declare member function `MemMgr<T>::MTResetCmd::usage' within `MemMgr<T>' memTest.cpp:49: error: cannot declare member function `MemMgr<T>::MTResetCmd::help' within `MemMgr<T>' memTest.cpp:60: error: cannot declare member function `MemMgr<T>::MTNewCmd::exec' within `MemMgr<T>' memTest.cpp:66: error: cannot declare member function `MemMgr<T>::MTNewCmd::usage' within `MemMgr<T>' memTest.cpp:72: error: cannot declare member function `MemMgr<T>::MTNewCmd::help' within `MemMgr<T>' memTest.cpp:83: error: cannot declare member function `MemMgr<T>::MTDeleteCmd::exec' within `MemMgr<T>' memTest.cpp:89: error: cannot declare member function `MemMgr<T>::MTDeleteCmd::usage' within `MemMgr<T>' memTest.cpp:96: error: cannot declare member function `MemMgr<T>::MTDeleteCmd::help' within `MemMgr<T>' memTest.cpp:107: error: cannot declare member function `MemMgr<T>::MTPrintCmd::exec' within `MemMgr<T>' memTest.cpp:115: error: cannot declare member function `MemMgr<T>::MTPrintCmd::usage' within `MemMgr<T>' memTest.cpp:121: error: cannot declare member function `MemMgr<T>::MTPrintCmd::help' within `MemMgr<T>' memTest.cpp:124: error: expected `}' at end of input memMgr.h: In member function `void MemMgr<T>::reset(size_t)': memMgr.h:200: error: `MemBlock' is not a type ../../include/cmdParser.h: In member function `bool MemMgr<T>::CmdParser::openDofile(const std::string&)': ../../include/cmdParser.h:134: error: `_dofile' undeclared (first use this function) ../../include/cmdParser.h:134: error: (Each undeclared identifier is reported only once for each function it appears in.) memTest.h: In member function `void MemMgr<T>::MemTest::newArrs(size_t, size_t)': memTest.h:55: error: expected identifier before '[' token memTest.h:55: error: expected `,' or `;' before "MemTestObj" ../../include/myUsage.h: In member function `double MemMgr<T>::MyUsage::checkMem() const': ../../include/myUsage.h:63: error: no match for 'operator!' in '!inf' ../../include/myUsage.h:63: note: candidates are: operator!(bool) <built-in> ../../include/myUsage.h:69: error: invalid use of undefined type `struct std::ifstream' /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:90: error: declaration of `struct std::ifstream' ../../include/myUsage.h:70: error: invalid use of undefined type `struct std::ifstream' /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:90: error: declaration of `struct std::ifstream' ../../include/myUsage.h: In member function `double MemMgr<T>::MyUsage::checkTick() const': ../../include/myUsage.h:79: error: `tms' undeclared (first use this function) ../../include/myUsage.h:79: error: expected `;' before "tBuffer" ../../include/myUsage.h:80: error: `tBuffer' undeclared (first use this function) ../../include/myUsage.h:80: error: there are no arguments to `times' that depend on a template parameter, so a declaration of `times' must be available ../../include/myUsage.h:80: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) memTest.cpp: At global scope: memTest.cpp:22: error: expected unqualified-id at end of input memTest.cpp:22: error: expected `;' at end of input make[1]: *** [memTest.o] Error 1 Checking util... > compiling: myGetChar.cpp > compiling: myString.cpp > compiling: util.cpp Building libutil.a... Checking main... > compiling: main.cpp make[1]: Warning: File `../../lib/lib.d' has modification time 6 s in the future > building memTest... /usr/bin/ld: cannot find -lmem collect2: ld returned 1 exit status make[1]: *** [../../bin/memTest] Error 1 make: *** [all] Error 2 --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.85.22.136 ※ 編輯: Aweather 來自: 210.85.22.136 (12/09 16:20) ※ 編輯: Aweather 來自: 210.85.22.136 (12/09 16:20)
1F:推 timrau:看起來像是少個}或是;之類的.... 12/09 16:22
2F:推 Aweather:可是cmdParser.h我沒有去動...@@ 12/09 16:36
3F:→ Aweather:util.h也是 12/09 16:37
4F:推 ric2k1:是去檢查你新增的 code 是否有 } 或 ; 的問題... 12/09 20:57
5F:→ ric2k1:我將自己的 code 在 ccws3 compile 是 OK 的 12/09 20:59
6F:→ ric2k1:去 google 'expected unqualified-id before "namespace"' 12/09 20:59
7F:→ ric2k1:不過好像沒有什麼幫助... 12/09 21:00
8F:→ ric2k1:如果還有問題, 星期一可以過來找我... 12/09 21:01
9F:推 Aweather:解決了Orz 少一個 } 使得 include的東西出錯 Orz 12/10 14:50
10F:推 mikejdi:糟糕 我好像也有一樣的情形 12/10 20:07
11F:推 mikejdi:真的也是少一個"}".... 12/10 21:32







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

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

TOP