c++ - First CppUnit Test: undefined reference to CppUnit::SourceLine::SourceLine -


i trying use cppunit test first time. when try compile testing code get:

testing.cpp:(.text+0xca): undefined reference `cppunit::sourceline::sourceline(std::basic_string, std::allocator > const&, int)'

and many other error messages.

i guess reason compiler not know unittest library is. here found person asking same question. try use recommendation answers of linked questions still not work. when try c++ -lunittest++ testing.cpp get:

/usr/bin/ld: cannot find -lunittest++ collect2: ld gives 1 end-status 

in make files used others , work see: ldlibs := -lcppunit. tried c++ -lcppunit++ testing.cpp same error message -lunittest.

does know how can find location of unittest library , pass information compiler?

this how have managed compile code:

g++ testing.cpp -lcppunit 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -