After a few attempts in building the game project, I could'nt get the project built because I kept getting LNK2001 and LNK2019 errors. Both of these errors mostly happen when a function was declared in the header file without a definition in the source file.
However it is different case for FORCEINLINE functions, they must be declared and defined in the header ONLY. Any definition in the source file will cause the errors mentioned above.
The CORRECT WAY
Header File
public:
FORCEINLINE AActor* GetActor() const { return actor; }
***Source File should have nothing to do with GetActor().
Comments