undefined reference to ‘func’
Follow this article: https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix
Second, compile using the terminal instead of using an editor like vscode
. For example:
g++ a.h a.cpp b.h b.cpp
vscode
there are many problems with link compilation of multiple files.
Similar Posts:
- undefined symbol: xxx – undefined reference to `typeinfo
- The source code installs the git tool, which shows /usr/local/lib64/libcrypto.a(dso_dlfcn.o) undefined reference to `dlopen’
- Hi3516DV300 Chip Error: “undefined reference to ×”
- Undefined reference to ` SEM appears when compiling with tcmalloc_ init’
- Undefined reference to ‘pthread’ appears in Linux Ubuntu running thread program_ Create ‘and undefined reference to’ pthread ‘_ ‘join’ error.
- .\Objects\BH-F103.axf: Error: L6218E: Undefined symbol RCC_APB2PeriphClkCmd (referred from bsp_led.o).
- [Solved] Kali hydra update Error: hydra: symbol lookup error
- [Solved] Undefined reference_G++ _GLIBCXX_USE_CXX11_ ABI compilation error: STD:: Basic_String and STD::__cxx11::basic_String cannot match
- Using SQLite to show undefined reference to ` SQLite3_ open’…
- error adding symbols: DSO missing from command line