1

I am trying to manipulate makefile such that it does unittesting too using gtest. these are the following errors which i encounter.

nPlugin/AbsEngine/obj/SunOS    AutoSegTask.o Image_unittest.o gtest-all.o gtest_main.o -o try_unittest
Undefined                       first referenced
 symbol                             in file
int prima::invertMap(const prima::Affin3<double>&,prima::Affin3<double>&) AutoSegTask.o
bool autoSegmentation::AutoSegTask::Details::setModelDirectory(const std::string &) AutoSegTask.o
void prima::read_pinnacle_image_info(std::string,std::vector<double>&) AutoSegTask.o
void autoSegmentation::AutoSegTask::Details::run() AutoSegTask.o
prima::Affin3<double>prima::createVolume2WorldMap(const prima::VolumeGeometry&) AutoSegTask.o
void autoSegmentation::AutoSegTask::Details::terminate() AutoSegTask.o
void autoSegmentation::AutoSegTask::Details::wait() AutoSegTask.o
bool prima::split_extender(const std::string &,std::string &,std::string &) AutoSegTask.o
bool prima::read_pinnacle_geometry(std::string,prima::VolumeGeometry*,int*,int*) AutoSegTask.o
ld: fatal: symbol referencing errors. No output written to try_unittest
gmake: *** [try_unittest] Error 2
paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • 2
    Can you post the makefile, too? – rubikonx9 Dec 15 '15 at 06:28
  • It looks like "AutoSegTask" is calling several classes that the linker can't find. MISSING: prima, autoSegmentation, etc. Q: Do you recognize them? Can you add these modules (.o object files) to your "link command? Q: Could you please post the link command from your Makefile? – paulsm4 Dec 15 '15 at 06:31
  • Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Andreas Fester Dec 15 '15 at 06:32

0 Answers0