DEV Community

mdh81
mdh81

Posted on

Answer: C++ inlining class methods causes undefined reference

7.1.2/4 of the Standard:

An inline function shall be defined in every translation unit in which it is used...

You use TestMethod in main.cpp, but it's not defined there.

... If a function with external linkage is declared inline in one translation unit, it shall be declared inline in all…

Top comments (0)