c++ - 您好,我阅读了大约 10 个教程,但我一直收到错误,这是我的 Makefile 文件和错误
问题描述
LNode : 链表节点
LList : 链表
Eleman:链表值类型
控制:所有主要代码
程序: main ,包含 kontrol()
g++ -I "./include" -c ./src/Program.cpp -o ./lib/Program.o
g++ ./lib/LNode.o ./lib/LListe.o ./lib/Kontrol.o ./lib/Program.o ./lib/Eleman.o -o ./bin/program
./lib/Kontrol.o:Kontrol.cpp:(.text+0x3e): undefined reference to `LListe<Eleman>::LListe()'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x1ad): undefined reference to `LListe<Eleman>::pushBack(Eleman
const&)'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x1de): undefined reference to `LListe<Eleman>::end()'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x2fc): undefined reference to `LListe<Eleman>::pushBack(Eleman
const&)'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x3fa): undefined reference to `LListe<Eleman>::pushBack(Eleman
const&)'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x44e): undefined reference to `LListe<Eleman>::end()'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x587): undefined reference to `LListe<Eleman>::pushBack(Eleman
const&)'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x68e): undefined reference to `LListe<Eleman>::pushBack(Eleman
const&)'
./lib/Kontrol.o:Kontrol.cpp:(.text+0x711): undefined reference to `LListe<Eleman>::begin()'
collect2.exe: error: ld returned 1 exit status
Makefile:3: recipe for target 'program' failed
mingw32-make: *** [program] Error 1
解决方案
推荐阅读
- php - PHP/MYSQL 错误:mysqli_result 类的对象无法转换为字符串
- sqlite - 无法加载 SQLite3.dll!Autohotkey 未发现错误
- ocr - Nativescript OCR 失败并出现一般错误
- python - 如何根据 NaN 之后的下一个有效值等于上一个有效值的条件回填 NaN 值
- google-apps-script - 如果单元格的值低于某个值,则发送电子邮件
- c++ - C++ 模板模板参数
- mysql - 列表包含非聚合列“otpallet_pokemonpalet.p.id”
- java - 为什么我的解决方案不能找到二叉树的最小深度?
- coq - 注入策略能否修改最终目标,或添加无关假设?
- java - [JAVA} A-Star 代码未找到最佳路径