<div dir="ltr">Hi All,<div><br></div><div>I am trying to create a brand new class for the core section of the code but I am getting linker errors. I am trying to include gui/qgsmapcanvas.h and then create a QgsMapCanvas object but I am getting an error which says that:</div>

<div><br></div><div>
<p style="margin:0px"><span style="color:rgb(190,20,20)">undefined reference to `QgsMapCanvas::QgsMapCanvas(QWidget*, char const*)'</span></p><p style="margin:0px"><br></p><p style="margin:0px">I am guessing this is because I am trying to use an object found in the gui library but somehow isn't getting linked correctly to the core library. I added the core class I created to the CMakeList.txt and it seems to build so I assume I did that correctly. Adding ../gui in the INCLUDE_DIRECTORIES section didn't seem to help but at least I can now refer to the header as just "qgsmapcanvas.h" instead of "../gui/qgsmapcanvas.h"</p>
<p style="margin:0px"><br></p><p style="margin:0px">Basically, I can't figure out the magic that is required to link a class from the gui library to the core library. What do I do? </p><p style="margin:0px"><br></p><p style="margin:0px">
Thanks,</p><p style="margin:0px">~Ben</p></div></div>