« Return to Thread: jade-native:test-link not using built products

Re: jade-native:test-link not using built products

by Michael Maven :: Rate this Message:

Reply to Author | View in Thread

Does anyone have an example POM for linking and running cppunit tests?

                 -Michael
Michael Maven wrote:
I'm trying to link my cppunit tests and the linker isn't picking up the .o files from the source build.
I would expect all the .o files to be specified in the linker statement with a -L.  Here's the output:

[INFO] g++ -g -m64 -o ./target/test-tefwfp ./target/obj/tefwfp-3.5/test/ExtractorTest.o ./target/obj/tefwfp-3.5/test/Log4CppTest.o ./target/obj/tefwfp-3.5/test/MainTest.o -L /opt/mysql/mysql/lib -L ../3rdparty/log4cpp-1.0/src/.libs -L ../3rdparty/cppunit-1.12.1/lib -l mysqlclient -lpthread -lnsl -lsec -lz -lsocket -llog4cpp -lcppunit-1.12
Undefined                       first referenced
 symbol                             in file
tef::wfp::FileFilter::FileFilter(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)./target/obj/tefwfp-3.5/test/ExtractorTest.o

needs a -L .\target\obj\tefwfp-3.5\debug\FileFilter.o

 « Return to Thread: jade-native:test-link not using built products