问题1:
g++ threads/platform/pthreads/Implementation.cpp -o threads/platform/pads/Implementation
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_star
(.text+0x18): undefined reference to `main'
makefile 在编译该文件的时候可能漏掉了.o
问题2:
undefined reference to `vtable for
出现上面问题可能是因为还有未实现的虚函数或在.h。

本文探讨了在使用g++进行编译时遇到的两个常见问题:一是未找到main函数引用,可能是由于编译过程中遗漏了某些.o文件;二是虚函数表引用未定义,这通常意味着存在未实现的虚函数或.h文件中的声明问题。文中提供了具体的错误信息及可能的原因分析。

被折叠的 条评论
为什么被折叠?



