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:
- C++Qt development – Qtsocket programming error: undefined reference to `_imp__WSAStartup
- [Solved] QT error: error: undefined reference to ` VTable`
- [Solved] QT Error: error: undefined reference to `GameModel::~GameModel()’
- [Solved] C++ error: undefined reference to `xxx‘
- error: undefined reference to `calculate()` [How to Solve]
- [Solved] cortex_M3 freeRTOS Error: undefined reference to `_sbrk‘
- Clion new method shows undefined reference to solution
- [Solved] Compile Error: undefined reference to `google::FlagRegisterer::FlagRegisterer
- [Solved] PCL Compile Error: undefined reference to `pcl::PCLBase<pcl::PointXYZRGBA>:: XXX
- GCC Error:(.text+0x24): undefined reference to `main‘collect2: error: ld returned 1 exit status [Solved]
- [Solved] VScode Error: undefined reference to ‘WinMain’ collect2.exe: error: ld returned 1 exit status
- ArchLinux starts error after modifying MariaDB database path Can’t create test file /xxxxx/xxxxx-test
- [Solved] Compile the program error: undefined reference to `cv::dnn::dnn4_v20210301::Net::~Net()‘
- [Solved] Qt Error: qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
- [Solved] qt phonon Play wav file Error:“symbol lookup error: /usr/lib/kde4/plugins/phonon_backend/phonon_gstreamer.so: undefined symbol: _ZNK6Phonon11MediaSource3mrlEv”
- [Solved] Android Networking error: CLEARTEXT communication to www.xxxxx.xyz not permitted by network security policy
- [Solved] QT error: the packaged exe of Enigma virtual box reports an error cannot load library qt5core.dll
- How to Solve Kotlin unresolved reference error
- Angular_ Error: Cannot assign to a reference or variable!
- [Go] Solve can’t load package: cannot find module providing package github.com/xxxxx