How to Solve Error: undefined reference to ‘func’

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: