Each source file (cpp file) must be compiled, and then after each source file is compiled, they are all linked together. If you have a makefile, you must add controller.cpp to the makefile. If you have a project, then you must add controller.cpp to the project. If you build on the command line, then you must add controller.cpp to the command line.

If you have trouble, tell us what compiler and/or IDE you are using and show the commands (if any) you are using to build the program.

Each source file (cpp file) must be compiled, and then after each source file is compiled, they are all linked together. If you have a makefile, you must add controller.cpp to the makefile. If you have a project, then you must add controller.cpp to the project. If you build on the command line, then you must add controller.cpp to the command line.

If you have trouble, tell us what compiler and/or IDE you are using and show the commands (if any) you are using to build the program.

Yea, I am using a make file, and I am using Cygwin, because this a linux based compiler and this is what's in it :

It's been awhile since I've even looked at a makefile, but it looks like something is missing. You will need to add controller.o to the OBJS, but I don't see where it specifies all the source files. Maybe in build.mak?

It's been awhile since I've even looked at a makefile, but it looks like something is missing. You will need to add controller.o to the OBJS, but I don't see where it specifies all the source files. Maybe in build.mak?

build.mak is just part of the sdk itself. Lemme see if adding it to the OBJS works.

Since both controller.cpp and main.cpp are including controller.h, the compiler compiles the functions in controller.h both times, and you get errors in the linking because they are defined multiple times. So the definitions for those functions (CControllerFunc::CControllerFunc() and CControllerFunc::~CControllerFunc()) in your header file should go in the controller.cpp file instead, or they should be moved inside the class declaration to be inlined.

Since both controller.cpp and main.cpp are including controller.h, the compiler compiles the functions in controller.h both times, and you get errors in the linking because they are defined multiple times. So the definitions for those functions (CControllerFunc::CControllerFunc() and CControllerFunc::~CControllerFunc()) in your header file should go in the controller.cpp file instead, or they should be moved inside the class declaration to be inlined.

That would beat the point of the header file. I don't wanna do that.
There another alternative?

That doesn't beat the point of the header file, since the class declaration would still go in the header and the class method definitions would go in the source file.

An alternative is to make the method definitions inline. You can do that by moving the definition inside the class declaration (instead of ending the constructor declaration with a semi-colon replace that with the block of code for the method itself).