C++ error: undefined reference to 的一种可能原因提示
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.
因为往往从Windows下拷贝来的文件他们本来可能实在visual studio的项目中,IDE的配置会帮助找到cpp文件。
Linux下注意同时include .h头文件和.cpp文件。