QCustomPlot Discussion and Comments

error LNK2019:Unresolved external symbol with VS2013Return to overview

Hi everyone,

I tried to find a solution from this forum with regards to qcustomplot but I am unable to find any solution up till now.

I downloaded this website Download examples (qcustomplot>examples>plots) and key in accordingly into VS2013. It can work at QT creator but will show 6-7 errors if run on VS2013 such as

Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QPrinter::setOutputFormat(enum QPrinter::OutputFormat)" (__imp_?setOutputFormat@QPrinter@@QAEXW4OutputFormat@1@@Z) referenced in function "public: bool __thiscall QCustomPlot::savePdf(class QString const &,int,int,enum QCP::ExportPen,class QString const &,class QString const &)" (?savePdf@QCustomPlot@@QAE_NABVQString@@HHW4ExportPen@QCP@@00@Z) C:\Tutorials\VS13Test\QTGraphPlot\QTGraphPlot\qcustomplot.obj QTGraphPlot

The other 6 errors are of similar type.

Do anyone seems to have a solution to this?

Somehow I manged to solve it.

Must troubleshoot to see if it works for your case:

Case 1) I go to the Solution Explorer >> Your project >> QT project setting >> QT Modules >> tick on print support (For problems that stubbornly ask for print support)

Case 2) LNK problem meaning that the programme locate/find the intended directory. Ensure that the #include "..." is linked between qcustomplot.h and the other .cpp and .h . AND ensure file is in the said directory.

Should there be continuous problem, do check the related version for the right terms. For an instance E.g. #include <QApplication> instead of #include<QWidgets/QApplication> . I believe this is the downside of QT as they rely on different versions for their 'terms' in the provided examples.