我一個關于類的多型以及繼承的代碼, 可以在win10 的codeblocks上運行, 但是在Linux的code blocks上運行就報錯,回傳的錯誤為typeinfo for xxxxx 未定義的參考 collect2: error: ld returned 1 exit status。請大家幫個忙。需要的話, 可以有償。
obj/Debug/mesh/mesh.o:在函式‘Entity::Entity(int)’中:
/home/simba/l3/mesh/mesh.cc:13:對‘vtable for Entity’未定義的參考
obj/Debug/mesh/mesh.o:(.data.rel.ro._ZTI4Face[_ZTI4Face]+0x10):對‘typeinfo for Entity’未定義的參考
obj/Debug/mesh/mesh.o:(.data.rel.ro._ZTI6Vertex[_ZTI6Vertex]+0x10):對‘typeinfo for Entity’未定義的參考
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/90296.html
標籤:C++ 語言
上一篇:求詳細說一下報錯原因,本人萌新
下一篇:求篇程式設計
