C_and_CPP 板


LINE

开发平台(Platform): (Ex: Win10, Linux, ...) Win10 编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出) VC++2017 额外使用到的函数库(Library Used): (Ex: OpenGL, ...) 问题(Question): 小弟目前在做学校的Double-Linked List的作业,教授提供框架叫我们把implementation写出来 之後执行教授提供的测试档时出现了LNK 2019的错误:https://goo.gl/zog1jk 上网查了一下,普遍都是说忘记把该连结的dll档写进程式,但我这种简单的程式根本不会用到任何外来的dll档案啊QQ 而且我的错误讯息後面有乱码,感觉跟网路上的案例都不太一样。 想请问有人知道要怎麽解决吗QQ 喂入的资料(Input): 预期的正确结果(Expected Output): 错误结果(Wrong Output): 1>------ 已开始建置: 专案: DoubleLinkedList, 组态: Debug Win32 ------ 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall DList<int>::DList<int>(void)" (??0?$DList@H@@QAE@XZ) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: bool __thiscall DList<int>::isEmpty(void)" (?isEmpty@?$DList@H@@QAE_NXZ) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: int __thiscall DList<int>::length(void)" (?length@?$DList@H@@QAEHXZ) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall DList<int>::insertFront(int const &)" (?insertFront@?$DList@H@@QAEXABH@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall DList<int>::insertBack(int const &)" (?insertBack@?$DList@H@@QAEXABH@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: class DListNode<int> * __thiscall DList<int>::front(void)" (?front@?$DList@H@@QAEPAV?$DListNode@H@@XZ) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: class DListNode<int> * __thiscall DList<int>::back(void)" (?back@?$DList@H@@QAEPAV?$DListNode@H@@XZ) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: class DListNode<int> * __thiscall DList<int>::next(class DListNode<int> *)" (?next@?$DList@H@@QAEPAV?$DListNode@H@@PAV2@@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: class DListNode<int> * __thiscall DList<int>::prev(class DListNode<int> *)" (?prev@?$DList@H@@QAEPAV?$DListNode@H@@PAV2@@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall DList<int>::insertAfter(int const &,class DListNode<int> *)" (?insertAfter@?$DList@H@@QAEXABHPAV?$DListNode@H@@@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall DList<int>::insertBefore(int const &,class DListNode<int> *)" (?insertBefore@?$DList@H@@QAEXABHPAV?$DListNode@H@@@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall DList<int>::remove(class DListNode<int> *)" (?remove@?$DList@H@@QAEXPAV?$DListNode@H@@@Z) 在函式 _main 中被参考 1>DoubleLinkedList.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall DList<int>::toString(void)" (?toString@?$DList@H@@QAEXXZ) 在函式 _main 中被参考 1>D:\Documents\GoogleDrive.infinite.r06\资料结构作业\HW3\DoubleLinkedList\Debug\DoubleLinkedList.exe : fatal error LNK1120: 13 个无法解析的外部符号 1>专案 "DoubleLinkedList.vcxproj" 建置完成 -- 失败。 ========== 建置: 0 成功、1 失败、0 最新、0 略过 ========== 程式码(Code):(请善用置底文网页, 记得排版) 程式码与错误讯息:http://goo.gl/pcZ8ao 各档案大概如下: DList.h.txt:提供double-linked list的控制项 DList.cpp:DList.h的implementation DListNode.h.txt:每个node DListNode.cpp.txt:node的implementation DoubleLinkedList.cpp.txt:测试的主程式码 补充说明(Supplement): --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.112.25.99
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/C_and_CPP/M.1508496802.A.DFA.html
1F:→ longlongint: 甚麽是 DList ? 10/20 19:06
2F:推 jerryh001: 有template的class宣告和定义不能分开 10/20 19:09
3F:→ Hazukashiine: 这周串列周? 10/20 19:10
4F:→ chengcti: 可以提供整个专案档吗 有可能设定错误 10/20 19:18
5F:推 damody: 推2楼 10/20 19:22
6F:→ nimsbnims: @longlongint 就是用来指向sentinel和提供node删减的类 10/20 20:03
7F:→ nimsbnims: @jerryh001 请问这是什麽意思QQ 10/20 20:04
8F:→ nimsbnims: @chengcti 好,我放在同一个google资料夹下了 10/20 20:04
9F:→ nimsbnims: @chengcti https://goo.gl/v8hvGw 10/20 20:07
10F:→ nimsbnims: @感谢jerryh001大大,我把所有实作都写在h就好了Orz 10/20 20:24
11F:→ moebear: 你程式码连结我点进去叫我跟你拿权限== 10/21 03:02
12F:→ nimsbnims: 抱歉,後来解决了我就把权限关闭了,解决方法後来是直 10/28 19:07
13F:→ nimsbnims: 接把实作都写入h档,或是改用codeblock 10/28 19:07







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