[Solved] Qt Error: undefined reference to xxxxx

Error reporting information:

first of all, it is necessary to distinguish the two types of error : undefined reference to xxxxx and "XXXX was not declared in this scope". The former is because the compiler can find the declaration of the function, but cannot find the definition of the function, so it reports an error; The latter is not found at all. You should first check whether the header file is missing.

For undefined reference to xxxxx, there are two situations at present

1. The path to ffmpeg in the pro file is not correct
2. The header file is written in C, but without extern "C" {}

 

Read More: