I'm trying to create a linked list but I get that error always. I separated it into .hpp and .cpp files, and thats where the problem lives I guess, the error I get when I compile the archive list.cpp (implementation of its methods) looks like this:
Undefined symbols for architecture x86_64:
"Node::Node(int)", referenced from:
List::insert(int) in list-6224f1.o
List::insertEnd(int) in list-6224f1.o
List::insertHead(int) in list-6224f1.o
List::insertIntoPos(int, int) in list-6224f1.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
But when I compile using "-c" parameter it works
g++ -Wall -Wconversion -c list.cpp