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

请输入看板名称,例如:Gossiping站内搜寻

TOP