免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3092 | 回复: 3

请教一个CPPUNIT的问题。 [复制链接]

论坛徽章:
0
发表于 2011-04-01 11:06 |显示全部楼层
在LINUX下安装了CPPUNIT 1.12.1,使用CPPUNIT 下的example的例子。链接有问题。同志们帮忙看下。谢谢。
是不是安装的有什么问题?
makefile 如下:
g++ -I/usr/local/cppunit-1.12.1/include -L/usr/local/cppunit-1.12.1/lib/libcppunit.a  -ldl ExampleTestCase.cpp Main.cpp -o testApp

linux的版本如下:
Linux MWR_SERVER_02 2.6.18-92.

出错信息如下:
ExampleTestCase.cpp.text+0xb2): undefined reference to `CppUnit::TestNamer::~TestNamer()'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::testAdd()':
ExampleTestCase.cpp.text+0x154): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp.text+0x19e): undefined reference to `CppUnit::Message::Message(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
ExampleTestCase.cpp.text+0x1cc): undefined reference to `CppUnit::Asserter::failIf(bool, CppUnit::Message const&, CppUnit::SourceLine const&'
ExampleTestCase.cpp.text+0x28: undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp.text+0x2bb): undefined reference to `CppUnit::SourceLine::~SourceLine()'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::anotherExample()':
ExampleTestCase.cpp.text+0x389): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp.text+0x3d3): undefined reference to `CppUnit::Message::Message(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
ExampleTestCase.cpp.text+0x3eb): undefined reference to `CppUnit::Asserter::failIf(bool, CppUnit::Message const&, CppUnit::SourceLine const&'
ExampleTestCase.cpp.text+0x4a7): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x4da): undefined reference to `CppUnit::SourceLine::~SourceLine()'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::example()':
ExampleTestCase.cpp:(.text+0x5cd): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0x61a): undefined reference to `CppUnit::assertDoubleEquals(double, double, double, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
ExampleTestCase.cpp:(.text+0x626): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x642): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x74a): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0x7ac): undefined reference to `CppUnit::Message::Message(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
ExampleTestCase.cpp:(.text+0x7c4): undefined reference to `CppUnit::Asserter::failIf(bool, CppUnit::Message const&, CppUnit::SourceLine const&'
ExampleTestCase.cpp:(.text+0x895): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x8cb): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x97c): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0x9c6): undefined reference to `CppUnit::Message::Message(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
ExampleTestCase.cpp:(.text+0x9de): undefined reference to `CppUnit::Asserter::failIf(bool, CppUnit::Message const&, CppUnit::SourceLine const&'
ExampleTestCase.cpp:(.text+0xa9a): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0xacd): undefined reference to `CppUnit::SourceLine::~SourceLine()'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::testEquals()':
ExampleTestCase.cpp:(.text+0xbe9): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0xc2a): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0xc46): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0xd72): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0xdb5): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0xdd1): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0xefd): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0xf24): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0xf40): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x105a): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0x10bc): undefined reference to `CppUnit::Message::Message(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
ExampleTestCase.cpp:(.text+0x10d4): undefined reference to `CppUnit::Asserter::failIf(bool, CppUnit::Message const&, CppUnit::SourceLine const&)'
ExampleTestCase.cpp:(.text+0x11a5): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x11db): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x12a4): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0x12d9): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x12f5): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x13fd): undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
ExampleTestCase.cpp:(.text+0x1455): undefined reference to `CppUnit::assertDoubleEquals(double, double, double, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ExampleTestCase.cpp:(.text+0x145e): undefined reference to `CppUnit::SourceLine::~SourceLine()'
ExampleTestCase.cpp:(.text+0x1477): undefined reference to `CppUnit::SourceLine::~SourceLine()'
/tmp/ccRk3hvi.o: In function `CppUnit::AutoRegisterSuite<ExampleTestCase>::AutoRegisterSuite()':
ExampleTestCase.cpp:(.text._ZN7CppUnit17AutoRegisterSuiteI15ExampleTestCaseEC1Ev[CppUnit::AutoRegisterSuite<ExampleTestCase>::AutoRegisterSuite()]+0x2d): undefined reference to `CppUnit::TestFactoryRegistry::getRegistry(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ExampleTestCase.cpp:(.text._ZN7CppUnit17AutoRegisterSuiteI15ExampleTestCaseEC1Ev[CppUnit::AutoRegisterSuite<ExampleTestCase>::AutoRegisterSuite()]+0x80): undefined reference to `CppUnit::TestFactoryRegistry::registerFactory(CppUnit::TestFactory*)'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::getTestNamer__()':
ExampleTestCase.cpp:(.text._ZN15ExampleTestCase14getTestNamer__Ev[ExampleTestCase::getTestNamer__()]+0x36): undefined reference to `CppUnit::TestNamer::TestNamer(std::type_info const&)'
/tmp/ccRk3hvi.o: In function `CppUnit::TestSuiteBuilderContext<ExampleTestCase>::~TestSuiteBuilderContext()':
ExampleTestCase.cpp:(.text._ZN7CppUnit23TestSuiteBuilderContextI15ExampleTestCaseED0Ev[CppUnit::TestSuiteBuilderContext<ExampleTestCase>::~TestSuiteBuilderContext()]+0x1d): undefined reference to `CppUnit::TestSuiteBuilderContextBase::~TestSuiteBuilderContextBase()'
/tmp/ccRk3hvi.o: In function `CppUnit::TestSuiteBuilderContext<ExampleTestCase>::~TestSuiteBuilderContext()':
ExampleTestCase.cpp:(.text._ZN7CppUnit23TestSuiteBuilderContextI15ExampleTestCaseED1Ev[CppUnit::TestSuiteBuilderContext<ExampleTestCase>::~TestSuiteBuilderContext()]+0x1d): undefined reference to `CppUnit::TestSuiteBuilderContextBase::~TestSuiteBuilderContextBase()'
/tmp/ccRk3hvi.o: In function `CppUnit::TestSuiteBuilderContextBase::TestSuiteBuilderContextBase(CppUnit::TestSuiteBuilderContextBase const&)':
ExampleTestCase.cpp:(.text._ZN7CppUnit27TestSuiteBuilderContextBaseC2ERKS0_[CppUnit::TestSuiteBuilderContextBase::TestSuiteBuilderContextBase(CppUnit::TestSuiteBuilderContextBase const&)]+0x11): undefined reference to `vtable for CppUnit::TestSuiteBuilderContextBase'
/tmp/ccRk3hvi.o: In function `CppUnit::TestSuiteBuilderContext<ExampleTestCase>::makeFixture() const':
ExampleTestCase.cpp:(.text._ZNK7CppUnit23TestSuiteBuilderContextI15ExampleTestCaseE11makeFixtureEv[CppUnit::TestSuiteBuilderContext<ExampleTestCase>::makeFixture() const]+0x11): undefined reference to `CppUnit::TestSuiteBuilderContextBase::makeTestFixture() const'

论坛徽章:
0
发表于 2011-04-01 11:06 |显示全部楼层
/tmp/ccRk3hvi.o: In function `CppUnit::TestCaller<ExampleTestCase>::TestCaller(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, void (ExampleTestCase::*)(), ExampleTestCase*)':
ExampleTestCase.cpp.text._ZN7CppUnit10TestCallerI15ExampleTestCaseEC1ESsMS1_FvvEPS1_[CppUnit::TestCaller<ExampleTestCase>::TestCaller(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, void (ExampleTestCase::*)(), ExampleTestCase*)]+0x2b): undefined reference to `CppUnit::TestCase::TestCase(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&':
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&]+0x60): undefined reference to `CppUnit::TestSuiteBuilderContextBase::getTestNameFor(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const& const'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&]+0xe3): undefined reference to `CppUnit::TestSuiteBuilderContextBase::addTest(CppUnit::Test*)'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&]+0x1dc): undefined reference to `CppUnit::TestSuiteBuilderContextBase::getTestNameFor(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const& const'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&]+0x253): undefined reference to `CppUnit::TestSuiteBuilderContextBase::addTest(CppUnit::Test*)'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&]+0x33d): undefined reference to `CppUnit::TestSuiteBuilderContextBase::getTestNameFor(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const& const'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)]+0x3b1): undefined reference to `CppUnit::TestSuiteBuilderContextBase::addTest(CppUnit::Test*)'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)]+0x489): undefined reference to `CppUnit::TestSuiteBuilderContextBase::getTestNameFor(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
ExampleTestCase.cpp.text._ZN15ExampleTestCase15addTestsToSuiteERN7CppUnit27TestSuiteBuilderContextBaseE[ExampleTestCase::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)]+0x4fd): undefined reference to `CppUnit::TestSuiteBuilderContextBase::addTest(CppUnit::Test*)'
/tmp/ccRk3hvi.o: In function `ExampleTestCase::suite()':
ExampleTestCase.cpp.text._ZN15ExampleTestCase5suiteEv[ExampleTestCase::suite()]+0x5: undefined reference to `CppUnit::TestSuite::TestSuite(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
ExampleTestCase.cpp:(.text._ZN15ExampleTestCase5suiteEv[ExampleTestCase::suite()]+0x97): undefined reference to `CppUnit::TestSuiteBuilderContextBase::TestSuiteBuilderContextBase(CppUnit::TestSuite&, CppUnit::TestNamer const&, CppUnit::TestFixtureFactory&)'
ExampleTestCase.cpp:(.text._ZN15ExampleTestCase5suiteEv[ExampleTestCase::suite()]+0x10: undefined reference to `CppUnit::TestSuiteBuilderContextBase::~TestSuiteBuilderContextBase()'
ExampleTestCase.cpp:(.text._ZN15ExampleTestCase5suiteEv[ExampleTestCase::suite()]+0x121): undefined reference to `CppUnit::TestSuiteBuilderContextBase::~TestSuiteBuilderContextBase()'
/tmp/ccRk3hvi.o: In function `CppUnit::TestCaller<ExampleTestCase>::~TestCaller()':
ExampleTestCase.cpp:(.text._ZN7CppUnit10TestCallerI15ExampleTestCaseED0Ev[CppUnit::TestCaller<ExampleTestCase>::~TestCaller()]+0x6e): undefined reference to `CppUnit::TestCase::~TestCase()'
ExampleTestCase.cpp:(.text._ZN7CppUnit10TestCallerI15ExampleTestCaseED0Ev[CppUnit::TestCaller<ExampleTestCase>::~TestCaller()]+0x89): undefined reference to `CppUnit::TestCase::~TestCase()'
/tmp/ccRk3hvi.o: In function `CppUnit::TestCaller<ExampleTestCase>::~TestCaller()':
ExampleTestCase.cpp:(.text._ZN7CppUnit10TestCallerI15ExampleTestCaseED1Ev[CppUnit::TestCaller<ExampleTestCase>::~TestCaller()]+0x6e): undefined reference to `CppUnit::TestCase::~TestCase()'
ExampleTestCase.cpp:(.text._ZN7CppUnit10TestCallerI15ExampleTestCaseED1Ev[CppUnit::TestCaller<ExampleTestCase>::~TestCaller()]+0x89): undefined reference to `CppUnit::TestCase::~TestCase()'
/tmp/ccRk3hvi.o: In function `CppUnit::AutoRegisterSuite<ExampleTestCase>::~AutoRegisterSuite()':
ExampleTestCase.cpp:(.text._ZN7CppUnit17AutoRegisterSuiteI15ExampleTestCaseED1Ev[CppUnit::AutoRegisterSuite<ExampleTestCase>::~AutoRegisterSuite()]+0xe): undefined reference to `CppUnit::TestFactoryRegistry::isValid()'
ExampleTestCase.cpp:(.text._ZN7CppUnit17AutoRegisterSuiteI15ExampleTestCaseED1Ev[CppUnit::AutoRegisterSuite<ExampleTestCase>::~AutoRegisterSuite()]+0x26): undefined reference to `CppUnit::TestFactoryRegistry::unregisterFactory(CppUnit::TestFactory*)'
/tmp/ccRk3hvi.o: In function `void CppUnit::assertEquals<long>(long const&, long const&, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ExampleTestCase.cpp:(.text._ZN7CppUnit12assertEqualsIlEEvRKT_S3_NS_10SourceLineERKSs[void CppUnit::assertEquals<long>(long const&, long const&, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x79): undefined reference to `CppUnit::AdditionalMessage::AdditionalMessage(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ExampleTestCase.cpp:(.text._ZN7CppUnit12assertEqualsIlEEvRKT_S3_NS_10SourceLineERKSs[void CppUnit::assertEquals<long>(long const&, long const&, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xbe): undefined reference to `CppUnit::Asserter::failNotEqual(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, CppUnit::SourceLine const&, CppUnit::AdditionalMessage const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccRk3hvi.o: In function `void CppUnit::assertEquals<int>(int const&, int const&, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ExampleTestCase.cpp:(.text._ZN7CppUnit12assertEqualsIiEEvRKT_S3_NS_10SourceLineERKSs[void CppUnit::assertEquals<int>(int const&, int const&, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x79): undefined reference to `CppUnit::AdditionalMessage::AdditionalMessage(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ExampleTestCase.cpp:(.text._ZN7CppUnit12assertEqualsIiEEvRKT_S3_NS_10SourceLineERKSs[void CppUnit::assertEquals<int>(int const&, int const&, CppUnit::SourceLine, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xbe): undefined reference to `CppUnit::Asserter::failNotEqual(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, CppUnit::SourceLine const&, CppUnit::AdditionalMessage const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccRk3hvi.o:(.rodata._ZTIN7CppUnit23TestSuiteBuilderContextI15ExampleTestCaseEE[typeinfo for CppUnit::TestSuiteBuilderContext<ExampleTestCase>]+0x10): undefined reference to `typeinfo for CppUnit::TestSuiteBuilderContextBase'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x20): undefined reference to `CppUnit::TestCase::run(CppUnit::TestResult*)'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x2: undefined reference to `CppUnit::TestLeaf::countTestCases() const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x30): undefined reference to `CppUnit::TestLeaf::getChildTestCount() const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x3: undefined reference to `CppUnit::Test::getChildTestAt(int) const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x40): undefined reference to `CppUnit::TestCase::getName() const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x4: undefined reference to `CppUnit::Test::findTestPath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CppUnit::TestPath&) const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x50): undefined reference to `CppUnit::Test::findTestPath(CppUnit::Test const*, CppUnit::TestPath&) const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x5: undefined reference to `CppUnit::Test::findTest(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x60): undefined reference to `CppUnit::Test::resolveTestPath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x6: undefined reference to `CppUnit::Test::checkIsValidIndex(int) const'
/tmp/ccRk3hvi.o:(.rodata._ZTVN7CppUnit10TestCallerI15ExampleTestCaseEE[vtable for CppUnit::TestCaller<ExampleTestCase>]+0x70): undefined reference to `CppUnit::TestLeaf::doGetChildTestAt(int) const'
/tmp/ccRk3hvi.o:(.rodata._ZTIN7CppUnit10TestCallerI15ExampleTestCaseEE[typeinfo for CppUnit::TestCaller<ExampleTestCase>]+0x10): undefined reference to `typeinfo for CppUnit::TestCase'
/tmp/ccIMVKGm.o: In function `main':
Main.cpp:(.text+0x92): undefined reference to `CppUnit::TestResult::TestResult(CppUnit::SynchronizedObject::SynchronizationObject*)'
Main.cpp:(.text+0xa3): undefined reference to `CppUnit::TestResultCollector::TestResultCollector(CppUnit::SynchronizedObject::SynchronizationObject*)'
Main.cpp:(.text+0xb6): undefined reference to `CppUnit::TestResult::addListener(CppUnit::TestListener*)'
Main.cpp:(.text+0xbf): undefined reference to `CppUnit::BriefTestProgressListener::BriefTestProgressListener()'
Main.cpp:(.text+0xcf): undefined reference to `CppUnit::TestResult::addListener(CppUnit::TestListener*)'
Main.cpp:(.text+0xd: undefined reference to `CppUnit::TestRunner::TestRunner()'
Main.cpp:(.text+0xfc): undefined reference to `CppUnit::TestFactoryRegistry::getRegistry(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
Main.cpp:(.text+0x117): undefined reference to `CppUnit::TestRunner::addTest(CppUnit::Test*)'
Main.cpp:(.text+0x19f): undefined reference to `CppUnit::TestRunner::run(CppUnit::TestResult&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
Main.cpp:(.text+0x232): undefined reference to `CppUnit::CompilerOutputter::CompilerOutputter(CppUnit::TestResultCollector*, std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
Main.cpp:(.text+0x272): undefined reference to `CppUnit::CompilerOutputter::write()'
Main.cpp:(.text+0x2a0): undefined reference to `CppUnit::TestSuccessListener::wasSuccessful() const'
Main.cpp:(.text+0x2d2): undefined reference to `CppUnit::CompilerOutputter::~CompilerOutputter()'
Main.cpp:(.text+0x2ee): undefined reference to `CppUnit::CompilerOutputter::~CompilerOutputter()'
Main.cpp:(.text+0x300): undefined reference to `CppUnit::TestRunner::~TestRunner()'
Main.cpp:(.text+0x319): undefined reference to `CppUnit::TestRunner::~TestRunner()'
Main.cpp:(.text+0x32b): undefined reference to `CppUnit::BriefTestProgressListener::~BriefTestProgressListener()'
Main.cpp:(.text+0x344): undefined reference to `CppUnit::BriefTestProgressListener::~BriefTestProgressListener()'
Main.cpp:(.text+0x359): undefined reference to `CppUnit::TestResultCollector::~TestResultCollector()'
Main.cpp:(.text+0x375): undefined reference to `CppUnit::TestResultCollector::~TestResultCollector()'
Main.cpp:(.text+0x38a): undefined reference to `CppUnit::TestResult::~TestResult()'
Main.cpp:(.text+0x3b2): undefined reference to `CppUnit::TestResult::~TestResult()'
collect2: ld returned 1 exit status

论坛徽章:
0
发表于 2011-04-01 13:32 |显示全部楼层
貌似是找不到库?

论坛徽章:
0
发表于 2011-04-01 14:38 |显示全部楼层
但是我在makefile里面已经直接把库指定了啊?并且这个目录里面也是有的。或者哪个兄弟能抛个makefile?多谢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP