[Solved] Makefile issue (Undefined symbols for architecture x86_64: “_main”, referenced from: implicit entry/start for main executable) [duplicate]


There are two separate errors.

First, you forgot to add main.cpp to your makefile.

Second, your main.cpp doesn’t contain a global function named main. A class member function named main doesn’t qualify. You need a function named main in the global namespace with external linkage.

solved Makefile issue (Undefined symbols for architecture x86_64: “_main”, referenced from: implicit entry/start for main executable) [duplicate]