top of page

FORCEINLINE functions

Writer's picture: Lee Choon Meng (Xynan)Lee Choon Meng (Xynan)

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().

12 views0 comments

Recent Posts

See All

Unreal + Jenkins DevOps: Zero To Hero

How many times have wasted precious time pushed out a faulty build due to some configuration Boolean changed for testing purposes? Or...

Unreal Automated Testing

As a Unreal video game developer, I can guarantee one of the most frustrating things in developing a game is the build you have cooked...

Comments


2020 by Xynan Lee.

  • LinkedIn
  • Instagram - Black Circle
bottom of page