If the code is migrated from Windows to Linux, please check if you have also included the .cpp file.
If you only include the .hpp header file, the compiler cannot find the definition of the function.
C++ error: undefined reference to
原文:https://www.cnblogs.com/mrlonely2018/p/14889591.html