The Qt c++ error LNK 2019: Unresolved external symbol often appear because the library that you try use in your program are not correctly linked to your program. This error is not hard to solve but now I will give you a trick which will help you to solve LNK 2019: Unresolved external symbol on Qt Creator.
What is the cause of LNK 2019: Unresolved external symbol?
For example in your program you try to use a library from the internet. For example
Is not enough to copy
include folder (from cURL) in your
compiler include folder and then use it in your program with
#include <example/example.h> . When you will call a function from the respective header you will get
LNK 2019: Unresolved external symbol. So, you will need to include the lib dependency
There you will find an article which will explain you how to add libs to your qmake:
However after you add libs to your qmake the risk to get again
LNK 2019: Unresolved external symbol will persist read the following trick and if you included correctly libs your application will work property.
How to solve LNK 2019: Unresolved external symbol
Open your project on qt creator >> go to your project >> right-click on the project >> Clean:
Now again right-click on the project >> Click on Run qmake:
Now go again>> right-click on the project and then click on Rebuild:
Now you can run your qt application.
If you get again LNK 2019: Unresolved external symbol error then you have not included libs correctly or the
libs are not compiled with the same compiler from Qt creator and you will have to compile libs with the same compiles you are using on Qt Creator and then include libs and will work.
You are now knowing how to fix LNK 2019: Unresolved external symbol error on Qt Creator and you are knowing from where this error is coming.
Something unclear? Comment >> Ask << Get respond