In today's Linux environment, there is a strange phenomenon, the link to the dynamic library is always reported similar to the following error:
(. text+0x13): Undefined reference to ' func '
The following are some of the inspection scenarios available:
1. If you hint that an undefined function is a function of a library. Check that the library is installed and import the library with the-L and-L parameters in the compilation command.
2. If you are prompted that an undefined function is a function in your program. Check whether in the header file, whether there is a corresponding obj file in the compilation, check whether the function or variable name is correct, whether it is due to inconsistent spelling.
3, if the hint is not defined function is a function in the program, there is a very hidden possibility: Check the context of the change function code has #ifdef or #ifndef, such as precompiled information, which is likely to cause the relevant code has not been compiled and appear "undefined reference to" Tips.