I ran into a snag lately. I want to add a class with its own files to the engine, but I don't know exactly how to include them.
I have a class called CIrrDeviceCustomPresenter, inside a .h and a .cpp with the same name.
In the Makefile, I assume the following:
Code: Select all
CUSTOMPRESDEVICE = CIrrDeviceCustomPresenter.o
# Next variable is for additional scene nodes etc. of customized Irrlicht versions
EXTRAOBJ = $(CUSTOMPRESDEVICE)
However, when I try to compile - and everything compiles fine, no errors - the object file CIrrdeviceCustomPresenter.o has next to nothing in it, unlike the other .o files for everything else. And as expected, I end up with linker errors complaining my class constructor doesn't exist. I didn't name my functions wrong or make any syntax errors. I checked again and again. The issue seems to be the compilation of my object file.
So there's the question: How do you add files to the engine so they compile correctly with everything else?
I've done this before, but I forgot.