I know that if I write the definition in a .cpp file, I resolve the problem, but since all methods and constructors don't have more than 2 lines, I have chosen to define them inline, which means that they need to be defined in the .hpp header.
Writing the definition in the .cpp file is really the correct solution. You need to forward declare the Exception
type in CallStack
, and move your implementation details for the function(s) that use Exception
into the .cpp files.