QCustomPlot Discussion and Comments

QCustomPlot VS 2013 - Linker ErrorsReturn to overview


I am trying to add QCustomPlot into my Visual Studio project but keep running into linker errors.

My project uses VTK + Qt for some volume rendering and I wanted to implement QCustomPlot for some graph visualization. I added the .cpp and .h files to my project folder and then ran CMake to get the VS solution.

Once I try to build the VS solution I get:

Error 1 error LNK2019: unresolved external symbol "public: void __thiscall QCPLayer::setVisible(bool)" (?setVisible@QCPLayer@@QAEX_N@Z) referenced in function "private: static void __cdecl QCPLayer::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QCPLayer@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPAX@Z) C:\Users\Prateek\Documents\Visual Studio 2013\Projects\Stereoscopic\build\moc_compilation.obj Stereoscopic

... Along with a bunch of others.

I'd appreciate any help to get this up and running!


A few quick thoughts
1) have you added the .cpp to the project (.pro)?
2) Have you run qmake?

(I am using qcustomplot with vs 2013 compiler and it compiles fine)