当前位置: 技术问答>linux和unix
编译问题,紧急求助!!!
来源: 互联网 发布时间:2017-02-09
本文导语: 我在用g++编译一个项目时,一直报下面这样的错误,不知道是怎么回事?哪位大侠能指点一下,原因在哪? Activity.o: In function `Activity::process_output()': Activity.cpp:(.text+0x7ae): undefined reference to `typeinfo for pbe::Unkn...
我在用g++编译一个项目时,一直报下面这样的错误,不知道是怎么回事?哪位大侠能指点一下,原因在哪?
Activity.o: In function `Activity::process_output()':
Activity.cpp:(.text+0x7ae): undefined reference to `typeinfo for pbe::UnknownException'
Activity.o: In function `pbe::ErrnoException::ErrnoException(std::basic_string, int)':
Activity.cpp:(.text._ZN3pbe14ErrnoExceptionC2ESsi[_ZN3pbe14ErrnoExceptionC5ESsi]+0x29): undefined reference to `vtable for pbe::ErrnoException'
Activity.o: In function `pbe::ErrnoException::~ErrnoException()':
Activity.cpp:(.text._ZN3pbe14ErrnoExceptionD2Ev[_ZN3pbe14ErrnoExceptionD5Ev]+0x16): undefined reference to `vtable for pbe::ErrnoException'
Activity.o: In function `pbe::ErrnoException::ErrnoException(pbe::ErrnoException const&)':
Activity.cpp:(.text._ZN3pbe14ErrnoExceptionC2ERKS0_[_ZN3pbe14ErrnoExceptionC5ERKS0_]+0x2d): undefined reference to `vtable for pbe::ErrnoException'
Activity.o: In function `pbe::throw_ErrnoException(std::basic_string, int)':
Activity.cpp:(.text._ZN3pbe20throw_ErrnoExceptionESsi[pbe::throw_ErrnoException(std::basic_string, int)]+0xa50): undefined reference to `typeinfo for pbe::ErrnoException'
Activity.o: In function `pbe::UnknownException::UnknownException()':
Activity.cpp:(.text._ZN3pbe16UnknownExceptionC2Ev[_ZN3pbe16UnknownExceptionC5Ev]+0x1f): undefined reference to `vtable for pbe::UnknownException'
Activity.o: In function `pbe::UnknownException::~UnknownException()':
Activity.cpp:(.text._ZN3pbe16UnknownExceptionD2Ev[_ZN3pbe16UnknownExceptionD5Ev]+0x13): undefined reference to `vtable for pbe::UnknownException'
Activity.o:(.rodata._ZTVN3pbe7NoSpaceE[vtable for pbe::NoSpace]+0x20): undefined reference to `pbe::ErrnoException::report(std::basic_ostream&) const'
Activity.o:(.rodata._ZTVN3pbe18InterruptedSysCallE[vtable for pbe::Interrupte
Activity.o: In function `Activity::process_output()':
Activity.cpp:(.text+0x7ae): undefined reference to `typeinfo for pbe::UnknownException'
Activity.o: In function `pbe::ErrnoException::ErrnoException(std::basic_string, int)':
Activity.cpp:(.text._ZN3pbe14ErrnoExceptionC2ESsi[_ZN3pbe14ErrnoExceptionC5ESsi]+0x29): undefined reference to `vtable for pbe::ErrnoException'
Activity.o: In function `pbe::ErrnoException::~ErrnoException()':
Activity.cpp:(.text._ZN3pbe14ErrnoExceptionD2Ev[_ZN3pbe14ErrnoExceptionD5Ev]+0x16): undefined reference to `vtable for pbe::ErrnoException'
Activity.o: In function `pbe::ErrnoException::ErrnoException(pbe::ErrnoException const&)':
Activity.cpp:(.text._ZN3pbe14ErrnoExceptionC2ERKS0_[_ZN3pbe14ErrnoExceptionC5ERKS0_]+0x2d): undefined reference to `vtable for pbe::ErrnoException'
Activity.o: In function `pbe::throw_ErrnoException(std::basic_string, int)':
Activity.cpp:(.text._ZN3pbe20throw_ErrnoExceptionESsi[pbe::throw_ErrnoException(std::basic_string, int)]+0xa50): undefined reference to `typeinfo for pbe::ErrnoException'
Activity.o: In function `pbe::UnknownException::UnknownException()':
Activity.cpp:(.text._ZN3pbe16UnknownExceptionC2Ev[_ZN3pbe16UnknownExceptionC5Ev]+0x1f): undefined reference to `vtable for pbe::UnknownException'
Activity.o: In function `pbe::UnknownException::~UnknownException()':
Activity.cpp:(.text._ZN3pbe16UnknownExceptionD2Ev[_ZN3pbe16UnknownExceptionD5Ev]+0x13): undefined reference to `vtable for pbe::UnknownException'
Activity.o:(.rodata._ZTVN3pbe7NoSpaceE[vtable for pbe::NoSpace]+0x20): undefined reference to `pbe::ErrnoException::report(std::basic_ostream&) const'
Activity.o:(.rodata._ZTVN3pbe18InterruptedSysCallE[vtable for pbe::Interrupte
|
一定是链接库问题。 也许要extern "C"?
|
貌似是peb这个库有问题