undefined reference to `vtable for XXX‘

Posted 柳鲲鹏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了undefined reference to `vtable for XXX‘相关的知识,希望对你有一定的参考价值。

  详细错误:

/usr/bin/ld: /tmp/ccZUXOcx.o: in function `AppLauncher::AppLauncher()':
ProductStarter.cpp:(.text._ZN11AppLauncherC2Ev[_ZN11AppLauncherC5Ev]+0xf): undefined reference to `vtable for AppLauncher'
/usr/bin/ld: /tmp/ccgYBOTx.o:(.data.rel.ro._ZTI15ProductLauncher[_ZTI15ProductLauncher]+0x10): undefined reference to `typeinfo for AppLauncher'
collect2: error: ld returned 1 exit status

  咱玩C++也有点年头了……其实这个错误是吾自己解决的。具体参考:

https://blog.csdn.net/quantum7/article/details/88085619

  吾在定义的时候也想到了这一点,只是觉得不是必须的。结果……

以上是关于undefined reference to `vtable for XXX‘的主要内容,如果未能解决你的问题,请参考以下文章

undefined reference to xxx

undefined reference to异常怎么解决

ubuntu下调试ffmpeg程序出现undefined reference to pthread_once ,undefined reference to uncompress错误

undefined reference to `err_quit' ; undefined reference to `err_sys’是什么错误?

c语言中undefined reference to ""怎么解决

php make报错undefined reference to symbol