用mac编译的时候出现这样错误,用clion、xcode、还有vscode编译都是这样错误。
CVector();
CVector(const CVector& vct);
CVector(CVector&& vct);
CVector& operator=(const CVector&cvt);
virtual ~CVector();
uint32_t Insert(uint32_t nPos,uint32_t nVal);//指定位置插入
uint32_t PushHead(uint32_t nVal);//头部插入
uint32_t PushTail(uint32_t nVal);//尾部插入
Undefined symbols for architecture arm64:
"vtable for CVector", referenced from:
CVector::CVector() in CVecotr-60a999.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
错误信息已经标明,链接需要arm64架构的库,链接时指定的库不是对应硬件架构的吧。