c++ - Failed to create first library. `undefined reference to `main` -
I am trying to create my first Linux based static library. I am following the instructions from this site here. This code is #ifndef _ADDNUMBERS_H #define _ADDNUMBERS_H class AddNumbers {Private: int _a; Int _b; Public: AddNumbers (); ~ AddNumbers (); Zero set A (int a); Zero set B (int b); Int getA () console; Int getB () const; Int getSum () console; }; // AddNumbers #endif // _ADDNUMBERS_H ~ / Workspace / C ++ / AddNumbers / src / AddNumbers.cpp # Include "AddNumbers.h" AddNumbers :: AddNumbers (): _a (0), _b (0) {} AddNumbers :: ~ AddNumbers () {} zero addNumbers :: setA (int a) {_a = a; } Zero AddNumbers :: setB (int b) {_b = b; } Int AddNumbers :: getA () const {return _a; } Int AddNumbers :: getB () const {return _b; } Int AddNumbers :: getSum () const {return _a + _b; } This is the makefill I am using. Header and CPP files are next to each other cc = G ++ ifeq ($ (DEBUG), yes) CSFALGS = -VAL-LDFALGS = -Vagal-G and CASFALGS = -Lal LDFALGS = -Wall endif A...