I am having an issue with my makefile
assignment3: BSTapp.cpp BST.o
g++ -o assignment3 BSTapp.cpp BST.o
BST.o: BST.cpp BST.h Node.o
g++ -c BST.cpp -o BST.o
Node.o: Node.h Node.cpp
g++ -c Node.cpp -o Node.o
getting an undefined reference to all methods in the Node class. But if I directly compile using
g++ -o assignment3 BSTapp.cpp BST.h BST.cpp Node.h Node.cpp
everything works fine. What am I doing wrong in the makefile?