makefile - Not found for architecture x86_64? -
i adding test suite doubly linked list, when add test suite, compiler error:
undefined symbols architecture x86_64: "test::runtests()", referenced from: doublelinkedlist::tester() in main.o "test::test(std::__1::basic_ostream >&)", referenced from: doublelinkedlist::tester() in main.o ld: symbol(s) not found architecture x86_64 clang: error: linker command
i think has makefile unsure.
here makefile
dll: main.o g++ -g -std=c++0x main.o -o dll main.o: main.cpp doublelinkedlist.h doublelinkedlist.hpp node.h node.hpp g++ -g -std=c++0x -c main.cpp test.o: doublelinkedlist.h test.cpp g++ -g -std=c++0x -c test.cpp clean: rm *.o lab03 echo clean done
here method definition , call doublelinkedlist.hpp.
template<typename t> void doublelinkedlist<t>::tester() { test mytester(std::cout); mytester.runtests(); }
Comments
Post a Comment