Can't seem to get the errors to go away. Errors are below. I have looked on google and still can't figure it out. It is not like I am new to Cpp, but have not fooled with it in a while.
Weird thing is it worked with G++ in Windows...
Errors:
main.cpp
#include <iostream>
#include "Help.h"
using namespace std;
int main () {
Help h;
h.sayName();
// ***
// ***
// ***
return 0;
}
Help.h
#ifndef HELP_H
#define HELP_H
class Help {
public:
Help();
~Help();
void sayName();
protected:
private:
};
#endif // HELP_H
Help.cpp
#include <iostream>
#include "Help.h"
using namespace std;
Help::Help() { // Constructor
}
Help::~Help() { // Destructor
}
void Help::sayName() {
cout << " ***************" << endl;
cout << " ************************************" << endl;
cout << " ************" << endl;
cout << " *********************" << endl;
}
g++ main.cpp Help.cpp
You have to tell the compiler all the files that you want it to compile, not just the first one.